Date select box's


#1

Hi

I have the following date select box

<%= date_select ‘min’, ‘min’ %>

When you submit a date, it re-loads the page with the same date select
box, but displays todays date, no matter what you submitted before.

How can I get it to re load with the submitted date.

Thanks
Scott


#2

scott wrote:

Hi

I have the following date select box

<%= date_select ‘min’, ‘min’ %>

When you submit a date, it re-loads the page with the same date select
box, but displays todays date, no matter what you submitted before.

How can I get it to re load with the submitted date.

check out date_select in the Rails Framework Documentation. The first
argument is object and the second one is method. If you have defined an
instance variable object which matches what you put in the date_select
argument for object which has a method matching what you put for method
then the date_select parts will take that value when the page loads.

Create a sample rails app and check out the edit page. It uses dates
there and gets them to autopopulate.


#3

still a bit unsure on what you mean here

the date select returns values in an array

with 3 values params[‘max’][‘max(1i)’] ,2i and 3i

but I have been unable to create an array with these names, the key
seems to want an int and not a string, any suggestions?

or am I on the wrong path all toggether?

Scott