How to Add Date Picker in Magento Config Page
- By smartz
- 5 May 2019
- Magento 1
System.xml
Create the new model file at the path:
appcodelocal
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();
}
}