php - sfWidgetFormJQueryDate doesn't pass validation in Symfony 1.4 -


i'm trying add sfwidgetformjquerydate project, doesn't want pass validation, shows "date invalid" when i'm trying filter.
here's code:

 $this->setwidgets(array(         'date' => new sfwidgetformdaterange(             array(                 'from_date' => new sfwidgetformjquerydate(array(                         'config' => '{buttontext: "choose date"}',                         'date_widget' => new sfwidgetformdate(array('format' => '%year%-%month%-%day%'))                     )                 ),                 'to_date' => new sfwidgetformjquerydate(array(                         'config' => '{buttontext: "choose date"}',                         'date_widget' => new sfwidgetformdate(array('format' => '%year%-%month%-%day%'))                     )                 ))),     // ...     $this->setvalidators(array(         'date' => new sfvalidatordaterange(             array('required' => false,                 'from_date' => new sfvalidatordate(                     array('required' => false)                 ),                 'to_date' => new sfvalidatordate(                     array('required' => false)                 ))), 

i missing something.

i found answer, it's bug in javascript of sfwidgetformjquerydate.

sfwidgetformjquerydate.class.php, line 106. need change

jquery("#%s option").attr("disabled", ''); 

to

jquery("#%s option").attr("disabled", false); 

because wrong code causes options of day disabled.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -