Sam Woodard
2006-Oct-28 18:24 UTC
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''%>
<!--[form:prebooking]-->
...here...
<!--[eoform:prebooking]-->
<%= 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 Date.today, {''prebooking'',
''start_date.month''} %>
<%= select_day Date.today, {''prebooking'',
''start_date.day''} %>
<%= select_year Date.today, {''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,
select_year?
Thanks,
Sam
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---