By now, I found that the error is due to some internal magic I use for my forms. Still a strange error. I was able to use a ZendX_JQuery_Form_Element_Datepicker, named 'begin' in a regular form that has no magic to it.

Bart

Bart McLeod schreef:
Hi all,

$elem = new ZendX_JQuery_Form_Element_DatePicker("begin", "12.12.2007", array(), array());
        $elem->setJQueryParam('dateFormat', 'dd.mm.yy');
        $this->addElement($elem);

yields:
*Catchable fatal error*: Argument 4 passed to ZendX_JQuery_View_Helper_DatePicker::datePicker() must be an array, null given in *E:\ZendFramework\library\ZendX\JQuery\View\Helper\DatePicker.php* on line *54

*while:

$elem = new ZendX_JQuery_Form_Element_DatePicker("*begin1*", "12.12.2007", array(), array());
        $elem->setJQueryParam('dateFormat', 'dd.mm.yy');
        $this->addElement($elem);

gets a datepicker. See the difference? The id! The id cannot be called 'begin'. It can be called 'begin1'. Maybe there is something in my form magic that it causing this. So I should try this without any magic, in a very simple form. Wanted to share it with you before I forget.

Bart

Reply via email to