views:

398

answers:

1

I am trying to set the date format of the date picker element, but I can't get it to work. How do you set the date format of a ZendX_JQuery_Form_Element_DatePicker element?

Solution:

Strange...I tried my original code sample again, and it worked.

$element = new ZendX_JQuery_Form_Element_DatePicker('date', array(
    'jQueryParams' => array(
        'dateFormat' => 'yy-mm-dd' //displays: 2010-01-26
    ),
));
A: 
$element = new ZendX_JQuery_Form_Element_DatePicker('date', array(
    'jQueryParams' => array(
        'dateFormat' => 'yy-mm-D'
    ),
));
SM
hmm strange...I tried my original code sample again and it worked just fine. Also, your format ('yy-mm-D') results in '2009-21-Mon'.
Andrew