HTML Part for adding calendar picker in admin side

<input name="dob" id="dob" value="" type="text" style="width:110px !important;" /> <img src="<?php echo $this->getSkinUrl('images/grid-cal.gif'); ?>" alt="" id="_accountdob_trig" title="Select Date" style="" />
 <script type="text/javascript">
 inputField: "dob",
 ifFormat: "%m/%e/%y",
 showsTime: false,
 button: "_accountdob_trig",
 align: "Bl",
 singleClick : true

in PHP Side

$dob = Mage::app()->getLocale()->date($postData['dob'], Zend_Date::DATE_SHORT);

Here $customer is using for customer model and storing the dob.


  2 Responses to “Magento : Calendar Date picker and date conversion to database”

  1. Wondering how to add the calendar picker to the Contact Us form:

  2. Keep It Up…

    Hey Thanks For writing this I enjoyed the Read…

 Leave a Reply




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

© 2014 Developers Corner Suffusion theme by Sayontan Sinha