I have a pop menu that contains a form with a jquery datepicker and the issue is that when I make a date selection, both the menu and the datepicker calendar closes.
I tried to use event.stopPropagation() in the Select event for the datepicker, but the I couldn't find a way to get a handle for the "event".
Also, I tried to return false at the end of the select event but again with no luck. Any help will be much appreciated. Thanks.
I was facing same issue and fixed it by adding in document ready:
/*Stop datepicker from closing dropdown menu*/
$("#ui-datepicker-div").click( function(event) {
event.stopPropagation();
});
the trick is that datepicker creates a div with id ui-datepicker-div so just stop event bubbling from that container and everything will work fine.
Source: http://forum.jquery.com/topic/datepicker-propogates-click-events
I fixed the issue by modifying the code so that the menu ignores any clicks from the datepicker.
i meet the same problem, at first ,i also want to stop event bubble, because, i click date picker, it doesn't work, input type is file is fired(below date picker), it solve it by setting data picker z-index to 999
code is here:
datepicker.css('z-index', 999);
it works for me