Hey,everyone,
I encountered a problem when getting a date through calendar date select plugin. It's convenient to put the very tag(calendar_date_select_tag) in a form, then get the date when the form is submitted, however, if I don't put the calendar_date_select_tag in a form, and just use it as an element which can show a calendar on the page, now I wanna update a specific area on the page when my mouse goes over the date on the calendar. so far, the trouble is I can not fetch the datetime in an onchange event? My code is as below:
<div id="calendar"> <%= calendar_date_select_tag :e_date, nil, :embedded => true, :year_range => 100, :month_year => "label", :onchange => remote_function(:update=>"events", :url=>study_plan_users_calendars_path) %> </div> <div id="events">Here comes the message which is updated according to the date<div>
How can I get the datetime which is used as some condition when updating the specific area? Or any other idea on solving this updating issue?