Categories | Question details Back To List | ||
Calling a method when the calendar is closed by choosing the Date How do i call a javascript method when the user selects a date in the calendar and the calendar closes?(Not when the user clicks on the X button) Any help is appreciated. Answer posted by Alex (support) on Jul 10, 2009 03:12 You can use onClick event handler: cal.setOnClickHandler(function(date){ /*your code here*/ }) Answer posted by SSV on Jul 12, 2009 08:27 Alex,
Thanks for the prompt answer. Actually what i am looking for is this - I have a textfield and am loading a calendar onclick. When a user clicks a date in the calendar, i would still like the date show up on the text field and then send the date to the server via AJAX Using setOnClickHandler, overrides the default behavior of setting the date in the calendar and the calendar closing. Any help is appreciated. Answer posted by Alex (support) on Jul 13, 2009 00:39 Hello, in this case you can use the following method instead of setOnClickHandler: cal.attachEvent("onClick",function(date){ }) |