Re: Pear QuickForm date element causing problems

From: Date: Tue, 10 Aug 2004 08:02:30 +0000
Subject: Re: Pear QuickForm date element causing problems
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14045@lists.php.net to get a copy of this message
Sam Miller wrote: >Yes, it is my code. The only thing was that I changed the label and name >of the element because I didn't want to post the whole code (more than >500 lines)! > >The name used to be $i and the label $label. I don't think that it is >necessary to post the whole code, but if you want to take a look at >everything, I can gladly post the whole thing. So you mean that 'format'=>'Y Y' is correct ? In this case, that's maybe wjat's giving you troubles. If what you want is 2 different year selects, you should use a group of 2 selects. It might also depend on the value in $i. Bertrand Mansion Mamasam PS: it is generally better accepted to write replies below the text of the original mail, not above... >Alexey Borzov wrote: >> Hi, >> >> Sam Miller wrote: >> >>> I'm using PEAR's quickform. It is quite useful, but sometimes it also >>> causes major headaches. Well, my problem at the moment is that I can't >>> get the date element to work properly. My code is: >>> >>> $this->addElement('date', 'Birthdate', 'Date of >>> Birth', >>> >>> array('language'=>strtolower($_SESSION['language']), >>> 'format'=>'Y Y', >>> >>> 'minYear'=>date('Y')-30, >>> >>> 'maxYear'=>date('Y'), >>> 'addEmptyOption' => TRUE) >>> ); >> >> >> This is obviously NOT your code (hint: 'format'). If your code is too >> precious to share, our time is too precious to waste. >

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