For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > June 2004 > Re: [PEAR] problem with html_quick_form date









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] problem with html_quick_form date
Justin Patrin

2004-06-30, 4:00 am

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--
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com