开发者

jQuery UI datepicker onSelect bubbling

I'm using the "onSelect" setting of the jQuery UI datepicker. Unfortunately I have two calendars where the user needs to select the date on each one AND I also need the calendars to hide if the user clicks on the pag开发者_JAVA技巧e. So, I attached a click event to the HTML tag that hides the calendar. The problem is that when I use the "onSelect" method of the datepicker, that also triggers the click event on the HTML tag and hides the calendar!

Any ideas?


if ($(event.target).closest(".ui-datepicker").size() === 0) {
    // No date picker was clicked!
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜