Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closeHandler Function example #3

Open
tmcclint opened this issue Mar 11, 2010 · 1 comment
Open

closeHandler Function example #3

tmcclint opened this issue Mar 11, 2010 · 1 comment

Comments

@tmcclint
Copy link

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

@bartosjiri
Copy link

bartosjiri commented Aug 20, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants