ZendX_JQuery Datepicker is not showing on focus; JavaScript console says Uncaught TypeError: Cannot read property 'guid' or undefined

175 Views Asked by At

I'm developing a calendar with jQuery Datepicker. All the other methods I called using ZendX_Jquery are fine except when I call the Datepicker. Here's my error on the JS console: TypeError: Cannot read property 'guid' or undefined.

Below is my method to create the field:

private function setDiveDate(){
   $element = new ZendX_JQuery_Form_Element_DatePicker("data");
   $element->setJQueryParam("changeMonth", true)
           ->setJQueryParam("changeYear", true)
           ->setJQueryParam('dateFormat', 'dd/mm/yy')
           ->setJQueryParam('showOn', 'button')
           ->setDescription("Select the dive date")
           ->setLabel('Dive Date')
           ->addValidator(new Zend_Validate_Date(
               array('locale', $this->locale)
               ));
   $this->addElement($element);
   return $this;
}
0

There are 0 best solutions below