Closed (fixed)
Project:
Event
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2007 at 20:43 UTC
Updated:
8 Apr 2007 at 21:00 UTC
The event_form_date() function takes a timestamp and returns a set of textfields and popups showing the day, month, year, hours and minutes. Version 1.215 of event.module doesn't show the correct month, at least with PHP 5.2.0.0 on Windows.
The reason is that the _event_date() function returns a string representation of the date (such as '02' for February). This is used as the #default_value for the month popup, but the #options for that popup are indexed with integers (2 for February).
One fix is to change the following line in event_form_date() from:
'#default_value' => _event_date('m', $timestamp, $offset),
to:
'#default_value' => (int) _event_date('m', $timestamp, $offset),
Comments
Comment #1
bexecho commentedOr alternatively use the PHP date format to just get the month without leading zeros.
Comment #2
killes@www.drop.org commentedhas been fixed
Comment #3
(not verified) commented