I don't really understand how forms are generated so this may be a very
I have some code that does a date select:
<%= f.label :StartDate%> <br />
<%= f.date_select :start_date %>
<%= f.label :EndDate %> <br />
<%= f.date_select :end_date %>
Which results in the following when posted:
Checked Out Times:
Start: 05-20-2009 18:30:20
End: 05-21-2009 19:30:20
However, when I go to edit the time I see the following in the date
Start Time: 20:18
End Time : 20:19
This occurs because my times are stored in the database as:
20:19:17 | 20:20:17 or as mm:hh:ss
Thus when the edit occurs it grabs the seconds and the minutes. Is
there a way to change the form to properly select the correct time?
I've tried :order => [:hour, :minute, :second] like here
but haven't found a way to do it. Am I using the wrong type of form?
Should I be querying the database in a different way?