HTML_QuickForm setDefaults() for a date element?
| From: | Tijs Teulings | Date: | Wed, 09 Jun 2004 14:20:53 +0000 |
| Subject: | HTML_QuickForm setDefaults() for a date element? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-13040@lists.php.net to get a copy of this message | ||
Hi there,
First off; i have been lurking on this list until now so i should
introduce myself...
i'm a programmer working at a small internet company in Amsterdam, The
Netherlands.
So now for my question :)
I have a form that contains, among others a date element. I am trying
to set the default value for the form elements with
$form->setDefaults($row);
the date element was configured with the following options
$date_options = array(
'language' => 'nl',
'format' => 'dMY',
'minYear' => 2004,
'maxYear' => 2010
);
and a print_r($row['startdate']) of the data i am using as the default
looks like
Array ( [d] => 02 [M] => 05 [Y] => 2005 )
the other fields from $row act fine as defaults for the rest of the
form elements but the date element does not react to the default
value....
any suggestions?
Best regards,
Tijs