Home » Tutorials For Beginner » How to add date picker to Magento admin backend page

How to add date picker to Magento admin backend page

In this tutorial, we will go through how to add Date Picker toMagento admin backend configuration page. There is no direct model that can be called to add the date picker. However, these simple steps will allow you to add the date picker to back-end of your Magento site

how to add date picker in magento

Step 1.

Edit system.xml, create the new field as follows:

 

Step 2.

Create the new model file at the path: app\code\local\<NAMESPACE>\<MODULE>\Block\Adminhtml\System\Config\Date.php 

Well done, happy coding!

About Brian Wilson

avatar
Brian is a freelance Magento developer with 5 years of experience with customizing Magento extensions, magento themes. He's interested in sharing Magento Tutorials to the community

2 comments

  1. avatar

    Hello,

    I’ve used your how to to add Date Picker to an easy extension made by me.
    I got every time this error:

    Fatal error: Class ‘Mage_DY_GestioneInformazioni_Block_Adminhtml_System_Config_Date’ not found in /var/www/vhosts/doubleyou.basiliko.net/httpdocs/app/code/core/Mage/Core/Model/Layout.php on line 590

    Can you help me?

  2. avatar

    I have a custom module that has date picker in it, it work as well when I choose start date for special price in mg1.8 but in mg1.9 start date for special price do not save as correct date and save in 01/01/1970 !
    Do you know what is the problem here ?
    work in magento 1.8 and do not work in magento 1.9 ?!

    Regards

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Scroll To Top