I would like to use two picklists to control entry into a date field; I'm concerned with the month and year, not the day. So far, I have the following:
<tr>
<td>Date Range:</td>
<td>
<%= select_month(Date.today, :field_name=>"dateStarted") %>
<%= select_year(Date.today, :field_name=>"dateStarted") %>
to
<%= select_month(Date.today, :field_name=>"dateEnded") %>
<%= select_year(Date.today, :field_name=>"dateEnded") %>
</td>
</tr>
This will correctly set the month and year corresponding to today's date. Unfortunately, the select fields do not respond to values in the respective fields. What am I missing?
Moreover, I assume that I will need to combine these two fields in the controller's create and update actions to create an actual date that will be stored in the db, but I am unclear how to do so.
Help is appreciated.