# Getting the datetime when using Calendar Date Select plugin in an Ajax update operation

**URL:** <https://www.ruby-forum.com/t/getting-the-datetime-when-using-calendar-date-select-plugin-in-an-ajax-update-operation/138399>\
**Category:** Rails\
**Created:** [May 22, 2008, 4:50pm UTC](https://www.ruby-forum.com/t/getting-the-datetime-when-using-calendar-date-select-plugin-in-an-ajax-update-operation/138399 "2008-05-22T16:50:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://www.ruby-forum.com/u/andy)\
**Post date:** [May 22, 2008, 4:50pm UTC](https://www.ruby-forum.com/t/getting-the-datetime-when-using-calendar-date-select-plugin-in-an-ajax-update-operation/138399/1 "2008-05-22T16:50:45Z")

</div>

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:

 \<%= 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) %\>

Here comes the message which is updated according to the date

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?
