开发者

Setting default setting for all jQuery-UI datepicker instances

开发者 https://www.devze.com 2023-02-11 12:42 出处:网络
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.

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...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号