CalendarView
CalendarView copied to clipboard
closeHandler Function example
I'm trying to use the closeHandler parameter to run my function after the calendar pop-up closes. When I run it like this: Calendar.setup( { dateField: 'txtDeparture', triggerElement: 'departureBtn', closeHandler: 'updateFunc' } )
I get this error in Firebug: this.closeHandler is not a function http://www.mywebsite.com/js/calendarview.js Line 495
When I put a watch on that line, I see that "closeHandler" equals my function name but I think there might be a problem in the way I'm setting up that parameter. I can run my function through an onblur event and get the results I expect so I don't think it's my function causing the issue. Any clarification you can provide would be welcome.
Todd McClintic http://www.mcclinticdesign.com
Had the same problem with selectHandler.
My workaround is to add onclick event after tbody is defined for the calendar table (link to source code line):
tbody.setAttribute('onclick', 'yourfunction()')
After that you can define your function and for example hide the embedded calendar with js/jquery change of display css attribute.