Forum: Ruby on Rails select_date question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A6c8bedf32359c2989105982d68a0f8e?d=identicon&s=25 Nic Xie (yudora111)
on 2009-01-21 02:04
Hi all,

I have problem using select_date. I put it in a form and submit the
form. When the page is loaded, user's selection of the date disappear.

What I want to do is very easy. I want to get the start date and end
date from user ,run the appropriate query and then show the result.
Why does this happen?

my code is like:

<form action="..." method=post>
  Start Date:
  <%= select_date Date.today%>
  <br/>
  End Date:
  <%= select_date Date.today %>
  <br/>
  <div style="display:inline"><%= submit_tag
'Submit',:style=>"height:24px;    font-size:12px" %></div>
  <br/>
</form>

Thanks in advance
This topic is locked and can not be replied to.