I have a variable @the_date and a date_select form helper without an associated model.
How to use date_select to display the appropriate HTML?
The following does not work:
<%= date_select "the_date", @the_date %>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s what finally worked:
I am storing the date as a string. So, it needs to be converted to a date object before displaying in the HTML form, and converted back to a string before saving in the database.