PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_QuickForm » Bug #1303

set default date

Details

Submitted2004-04-28 00:02 UTC
Fromboci at dravanet dot hu
StatusBogus
PackageHTML_QuickForm
PHP VersionIrrelevant
OSLinux
Roadmaps(Not assigned)

Comments

[2004-04-28 00:02 UTC] boci at dravanet dot hu

Description:
------------
Hi!

I try to set the default date with all methods (setValue,setDefaults etc.)
Because no effect.
I try to set with array, with time(), with string (now, etc).

[2004-04-28 06:59 UTC] boci at dravanet dot hu

Hi!

Half success!
I do this:
}$form->setDefaults(
array(
"end"=>array(
"Y"=>date("Y"),
"M"=>date("m"),
"d"=>date("d")
)
)
);

$options=array(
'language'=>'hu',
'format'=>'YFd',
'minYear'=>(date("Y")-2),
'maxYear'=>(date("Y")+5)
);
$form->addElement("date","end","Megjelenés vége:",$options);

The problem: Year and day set sucessfully, because the month not. (The month is localized and full size).
I can't set correctily the default values (the 3.2.2 changelog say I can set it with string (strtotime)) so this is not a question, it's a bug report,because it's not work ;)

[2005-10-21 09:24 UTC] oreficem at venturanet dot it

I found bug in HTML_QuickForm_date::onQuickFormEvent();

swap return assignemts. when we need update value we must call HTML_QuickForm_group::onQuickFormEvent not HTML_QuickForm_element::onQuickFormEvent