我会将此calendar_date_select生成的值传递给控制器。 onchange代码需要修改才能这样做。有什么建议吗?
<%= calendar_date_select_tag "meeting_date_1", @time,
:embedded => true,
:time => true,
:minute_interval => 15,
:onchange => "$('dv').update($F(this));" %>
答案 0 :(得分:0)
成功!这有效!控制器:
@team.meeting_date_1 = params[:mtg_date]
观点:
<%= calendar_date_select_tag "calendar", @time,
:embedded => true,
:time => true,
:minute_interval => 15,
:onchange => remote_function(
:method => :put,
:url => {:action => "update_team_mtg_date", :id => @team.id},
:with => "'mtg_date='+($F(this))",
:loading => "$('date_spinner').setStyle({visibility: 'visible'});",
:complete => "$('date_spinner').setStyle({visibility: 'hidden'});" ) %>