Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
forms system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2007 at 16:49 UTC
Updated:
21 May 2007 at 14:01 UTC
If no default value is given for the date field, it is supposed to default to today's date. However, expand_date() uses !isset() to determine whether a value has been given. Since the value is an empty string when not specified, this means the date field defaults to 1 January 1900. The attached patch fixes this by replacing !isset() with empty().
| Comment | File | Size | Author |
|---|---|---|---|
| form.inc-date.patch | 735 bytes | darren oh |
Comments
Comment #1
darren ohIf anyone would like to test this, I suggest trying the following code with and without the patch:
Comment #2
chx commentedYup.
Comment #3
drummCommitted to 5.
Comment #4
dries commentedCommitted to CVS HEAD. Thanks.
Comment #5
darren ohThe Drupal 4.7 Form API works differently, so it doesn't require fixing.
Comment #6
(not verified) commented