5May, 2019

How to Add Date Picker in Magento Config Page

System.xml


text
MODULE_NAME/adminhtml_system_config_date
4
1
1
1
Set the expiry date for the Feature Tour

Create the new model file at the path:
appcodelocalBlockAdminhtmlSystemConfigDate.php

getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);

$data = array(
‘name’ => $element->getName(),
‘html_id’ => $element->getId(),
‘image’ => $this->getSkinUrl(‘images/grid-cal.gif’),
);
$date->setData($data);
$date->setValue($element->getValue(), $format);
$date->setFormat(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT));
$date->setForm($element->getForm());

return $date->getElementHtml();
}
}