Re: problem with html_quick_form date

From: Date: Wed, 30 Jun 2004 07:52:05 +0000
Subject: Re: problem with html_quick_form date
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13409@lists.php.net to get a copy of this message
Have you set date_element_format? Try setting it do "dmY" in your ini file. On Wed, 30 Jun 2004 08:23:45 +0100, Jerry <laurent.ludovic@free.fr> wrote: > > Good morning > > I've a problem with html_quick_form date element . I've the following error > message : > > Notice: strtotime(): Called with empty time parameter in > /var/www/appli-box.com/htdocs/pear/PEAR/HTML/QuickForm/date.php on line 373 > > Could someone help me?? > > Here's my script : > > function preGenerateForm(&$formBuilder) > > { > > $el = array(); > > $tabattributes['language']='fr'; > > $tabattributes['minYear']='2004'; > > $el['OPR'] = &HTML_QuickForm::createElement('date', 'OPR', > 'OPR',$tabattributes); > > $this->preDefElements = &$el; > > } > > function postGenerateForm(&$form) > { > > if(isset($this->id)){ > > $tabOPR=array('d' => date('d', strtotime($this->OPR)), > 'M' => date('m', > strtotime($this->OPR)), 'Y' => date('Y', strtotime($this->OPR))); > > }else{ > > $tabOPR=array('d' => date('d'), 'M' => > date('m'), 'Y' => date('Y')); > > } > > $constantValues['OPR'] = $tabOPR ; > > $form->setDefaults($defaultsValues); > $form->setConstants($constantValues); > } > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > !DSPAM:40e26887281801323796366! > > -- paperCrane --Justin Patrin--

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