magento将日历日期选择器添加到管理员中的自定义表单(自定义模块)

Nik*_*K_R 5 calendar magento

我从 - Modulecreator创建了自定义模块.
现在我想在我的自定义表单中添加日历日期选择器字段 - (在管理员端).
喜欢From date To date.

从日期选择器中选择的值应在提交时添加到数据库中.
谢谢.

Nik*_*K_R 18

$fieldset->addField('date', 'date', array(
    'name'               => 'date',
    'label'              => Mage::helper('your_module_name')->__('Date'),
    'after_element_html' => '<small>Comments</small>',
    'tabindex'           => 1,
    'image'              => $this->getSkinUrl('images/grid-cal.gif'),
    'format'             => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) ,
    'value'              => date( Mage::app()->getLocale()->getDateStrFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT),
                                  strtotime('next weekday') )
));
Run Code Online (Sandbox Code Playgroud)