Home » HTML » HTML_QuickForm » Bug #9600
date element problem with _createOptionList function
Details
| Submitted | 2006-12-12 16:40 UTC |
|---|---|
| From | sstratiev at gmail dot com |
| Status | Wont fix |
| Package | HTML_QuickForm |
| PHP Version | 4.3.6 |
| OS | Windows XP Media Edition |
| Roadmaps | (Not assigned) |
Comments
[2006-12-12 16:40 UTC] sstratiev at gmail dot com
Description:
------------
This problem/feature regards the _createOptionList at dates.php file.
when _createOptionList generates the dropdowns, visualy it shows the values with leading zeroes -> 2007-01-01 for example. But when i see the html code the <option> value attribute is without the leading zero - <option value = 1>.
I have problem on the linux server with the strtotime function as it expects leading zeroes and it cannot convert the dates & times properly.
Is't it a good idea the option element values to be with leading 0, so every time converting function can use them.
$options[$i] = sprintf('%02d', $i);
can be
$value = sprintf('%02d', $i);
$options[$value] = $value;
Tell me what you think about this as you are far more familiar with the class and it's usage.
[2006-12-13 00:18 UTC] sstratiev at gmail dot com
ok, i will use mktime. 10x for the reponse