QF and null in date elements

From: Date: Wed, 28 Jan 2004 16:30:07 +0000
Subject: QF and null in date elements
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10405@lists.php.net to get a copy of this message
Hi all I'v got a Problem with QF. I use the form to update records in the db. If I load the form, I set the defaultvalues with values from the db ($form->setDefaults($defaultValues);). Among other elements, i have date elements like $form->addElement('date', 'frm_lieferdatum', get_page_item('frm_futter_lieferdatum'), array('format'=>$frm_date_format, 'minYear'=>2000, 'maxYear'=>date('Y')+1)); If the date value in the db field is null, QF comes in trouble. The three grouped elements (day,month,year) shows the min. possible date, in this case 1.1.2000. If the user press the save button, naturally the date 1.1.2000 will be saved and thats wrong. It should be still null! Does anyone have a solution for this problem?

« previous php.pear.general (#10405) next »