Setting default setting for all jQuery-UI datepicker instances
I am using jQuery-UI Datepicker (via ZendX view helper) to select dates. Now I would like to set default settings (setDefaults) which sets default setting for all Datepicker instances.
This is how my form looks like:
<form method="post" action="/hello/world">
<?php
开发者_如何学运维 echo $this->datePicker("dp1",'',array(
'defaultDate' =>date('Y m d',time()),
'showWeek' => 'true',
'firstDay' => 1,
'dateFormat' => 'dd.mm.yy',
'changeYear' => 'true',
'changeMonth' => 'true'
));
echo $this->datePicker("dp2",'',array());
?>
<input type="submit" value="Submit" />
</form>
Does someone know how to set this when using Zend Framework?
Thanks, Udo
You could extend the DataPicker View Helper class (or what ever it is called) and create your own constructor. Then use that custom class...
精彩评论