Default Value for date_select helper


#1

Hi All:

Just curious if anyone has figured out how to set a default date for the
date_select helper.

My application has a form with both a start date and end date select for
the user. Since the period between the two is a minimum of 24 hours I
wanted to have the start date default to Date.today (which it does
automatically) and then have the end date default to the following date
(i.e. start date = 06/01/2006; end date = 06/02/2006).

Any ideas?

Thanks!


#2

My application has a form with both a start date and end date
select for
the user. Since the period between the two is a minimum of 24 hours I
wanted to have the start date default to Date.today (which it does
automatically) and then have the end date default to the following
date
(i.e. start date = 06/01/2006; end date = 06/02/2006).

If the period between them must be a minimum of 24 hours and you’re
selecting a date rather and a date and time, why do you need a date
select box for the second date? Given any start date, you only have
two options for the end date: the same day and the day after.


Michael D.
http://www.mdaines.com