Re: date problem with dateElementFormat

From: Date: Sat, 08 Jan 2011 06:23:44 +0000
Subject: Re: date problem with dateElementFormat
References: 1 2 3 4 5 6  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-30905@lists.php.net to get a copy of this message
How about $fb = DB_DataObject_FormBuilder::create($do, array('minYear' => '2000', 'maxYear' => '2020')); is this one possible? Somehow not working. On Fri, Jan 7, 2011 at 11:33 AM, Brett Bieber <brett.bieber@gmail.com> wrote: > On Fri, Jan 7, 2011 at 1:28 PM, Jon Savian <worknit@gmail.com> wrote: >> On Fri, Jan 7, 2011 at 11:15 AM, Brett Bieber <brett.bieber@gmail.com> wrote: >>> On Fri, Jan 7, 2011 at 1:07 PM, Jon Savian <worknit@gmail.com> wrote: >>>> >>>> On Fri, Jan 7, 2011 at 10:39 AM, Michael Gauthier <mike@silverorange.com> >>>> wrote: >>>> > On Fri, 2011-01-07 at 09:48 -0800, worknit wrote: >>>> >> Hi I am using PEAR version 1.7.1 and am having a problem with >>>> >> $dateElementFormat =  'd-m-Y' -- for some reason my years stop >>>> >> at >>>> >> 2010, 2011 cannot be displayed.  Why is this the case?  My local >>>> >> system time shows 2011. >>>> >>>> It just says 2001 through 2010.  Maybe i am just using it wrong?  Is >>>> there a way to specify a time range? >>>> >>> >>> See the docs about the 'maxYear' option: >>> >>> http://pear.php.net/manual/en/package.html.html-quickform.html-quickform-date.html-quickform-date.php >>> >> How would one set this?  I not know php much.  Is it also possible for >> formbuilder app? > > For formbuilder, add method to your class with something like this: > >    function dateOptions($fieldName) >    { >      return array( >       'maxYear' => date('Y')+5 >      ); >    } > > > -- > Brett Bieber >

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