1

Give the solution for this error... this error comes when I go to add new item or edit item in admin panel

fieldset->addField('dateadded', 'date', array(
          'label'     => Mage::helper('someadd')->__('Date Added'),
          'class'     => 'required-entry',
          'required'  => true,
          'name'      => 'dateadded',
      ));

The Error is given below..

enter image description here

0

Add format of date

  fieldset->addField('dateadded', 'date', array(
      'label'     => Mage::helper('someadd')->__('Date Added'),
      'class'     => 'required-entry',
      'required'  => true,
      'format'  => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT,
      'image'     => $this->getSkinUrl('images/grid-cal.gif'),
      'class'     => 'validate-date',
      'name'      => 'dateadded',
  ));
  • Thank you Mohamed El Mrabet....I have 1 more question for you ...how to add datepicker in that field..I am very thankfull if you give the answer... – sdeveloper Dec 1 '17 at 6:14
  • Ok see my answer I ll updated ok – Mohamed El Mrabet Dec 1 '17 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.