Using select_month, ._day, ._year, instead of date_select

So I had

<%= date_select ‘prebooking’, ‘start_date’, :id => ‘start_date’,
:start_year => 2007, :end_year => Day.last_day.year, :order => [:month,
:day, :year] %>

inside of

<%= start_form_tag :action => ‘start_date’, :id => ‘start_date’%>


<%= submit_tag “Check Rate >” %>
<%= end_form_tag %>

and it worked.

I need to switch to select_month, select_day, and select_year tags like,

<%= select_month, {‘prebooking’, ‘start_date.month’} %>
<%= select_day, {‘prebooking’, ‘’} %>
<%= select_year, {‘prebooking’, ‘start_date.year’} %>

so that I can apply action listeners and ajax to the month and year
select fields, but this doesn’t work: I didn’t do it right. How do I
make the analog of the above date_select using the individual
components? In other words, how do I pass off the data to the right
model components using these tags, select_year, select_month,



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs