how to get selected/clicked value in calendar_date_select_tagin rails -


how selected/clicked value in calendar_date_select_tag in rails , pass params in controller (as format yyyy-mm-dd)as remote_function? have tried this

   <%= calendar_date_select_tag "calendar", @time,                              :embedded => true,                              :onchange => remote_function(                                      :method => :get,                                      :url => {:action => "show", :id => @vehicle},                                      :with => "'mtg_date='+($(this).val()",                                      :loading => "$('date_spinner').setstyle({visibility: 'visible'});",                                      :complete => "$('date_spinner').setstyle({visibility: 'hidden'});" ) %> 

but seems not working

write following in environment.rb/application.rb depending on rails version

calendardateselect.format = :american 

ref this other formats


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -