Quantcast
Channel:
Viewing all articles
Browse latest Browse all 4235

Re: How to permanently customise jquery.ui.datepicker

$
0
0

You need to overload DateField_View_JQuery and add your javascript file to the requirements.

class myDateField_View_JQuery extends DateField_View_JQuery {
   
   /**
    * @param String $html
    * @return
    */
   public function onAfterRender($html) {
      $html = parent::onAfterRender($html);
      
      Requirements::javascript('mydatefield.js');
      
      return $html;
   }
   
}

Object::useCustomClass('DateField_View_JQuery', 'myDateField_View_JQuery');


Posted to: How to permanently customise jquery.ui.datepicker | Show Thread | Post Reply


Viewing all articles
Browse latest Browse all 4235

Latest Images

Trending Articles



Latest Images