Forum: Ruby on Rails Strange select_date behavior or possible bug

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ddf9c98db9ac40c6875fd2a5b2d4fa72?d=identicon&s=25 Eric Northam (Guest)
on 2007-04-18 01:27
(Received via mailing list)
I'm using select_date to display combo boxes with a date selection and
I would like to change the selected date to be a day or a week from

<%= select_date ( + 1), :prefix => 'start_date' %>
<%= select_date ( + 7), :prefix => 'start_date' %>

Results in today's date being used

<%= select_date ( + 1), :prefix => 'end_date' %>
<%= select_date ( + 7), :prefix => 'end_date' %>

Results in tomorrow's date being used. For some reason if the prefix
includes 'start' the date is today otherwise it ends up being tomorrow
but in all the cases it appears that the passed date is ignored.

select_day however behaves as expected

<%= select_day ( + 1), :prefix => 'end_date' %> => combo
with tomorrow selected
<%= select_day ( + 7), :prefix => 'end_date' %> => combo
with the day for one week from now selected

Has anybody else noticed this? Is this just a bug or am I missing
Ddf9c98db9ac40c6875fd2a5b2d4fa72?d=identicon&s=25 Eric Northam (Guest)
on 2007-04-19 01:38
(Received via mailing list)
This was caused by Firefox recording the values set in the combos
regardless of whether the page was refereshed. When I accessed the
page via a link versus a referesh the combos worked fine.
This topic is locked and can not be replied to.