Re: Re: QuickForm dates

From: Date: Tue, 24 Jun 2003 04:18:34 +0000
Subject: Re: Re: QuickForm dates
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6206@lists.php.net to get a copy of this message
The Quick_Form date fields are nice, but in my particular case not that "usable". I just want a simple text field with constraints. Not that they won't work well in other cases. Cheers Graham At 09:08 PM 6/23/2003 -0400, Mitch Pirtle wrote:
Following-up to myself because I'm a big doofus -;^>=
2) If I want to use a regular text box for my date -- like below, how can I validate it as a date?? $form->addElement('text', 'dob', 'DoB'); $input = &$form->getElement('dob'); $input->setSize(15); $input->setMaxLength(15);
Don't do this as a text field, do it as a date field; look at QuickForm_example.php, for stuff like this: // Date elements $form->addElement('date', 'dateTest1', 'Date1:', array('format'=>'dmY', 'minYear'=>2000, 'maxYear'=>2004)); $form->addElement('date', 'dateTest2', 'Date2:', array('format'=>'d-F-Y', 'language'=>'de')); $form->addElement('date', 'dateTest3', 'Today is:', array('format'=>'l D d M Y')); -- Doofus (a.k.a. mitchy) -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Graham Clarke GrahamC@53Tech.com www.53Tech.com 603.643.9955

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