Zend Framework - JQuery - Date Picker - Format Date to YYYY-mm-dd

前端 未结 4 1623
被撕碎了的回忆
被撕碎了的回忆 2021-01-23 15:56

Im using a JQuery DatePicker in a Zend Framework based application Form. Here is the code for the date picker

$this->addElement(\'datePicker\',\'movie_release         


        
4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-23 16:28

    Ok I finally found how to do it:

    $element = new ZendX_JQuery_Form_Element_DatePicker('dp1',
                array('jQueryParams' => array('dateFormat' => 'yy-mm-dd'))
            );
    $this->addElement($element);
    

    That's it! Thanks for your help.

提交回复
热议问题