Datepicker: added check to account for multiple pickers on one page. Fixed #5818 – multiple DatePickers won't trigger close event(cherry picked from commit 82cf9e297f)

This commit is contained in:
ryanolton 2012-01-12 11:22:48 -05:00 committed by Scott González
parent 5953d194a3
commit 120ee58e5b

View File

@ -233,7 +233,10 @@ $.extend(Datepicker.prototype, {
inst.trigger.click(function() {
if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
$.datepicker._hideDatepicker();
else
else if ($.datepicker._datepickerShowing && $.datepicker._lastInput != input[0]) {
$.datepicker._hideDatepicker();
$.datepicker._showDatepicker(input[0]);
} else
$.datepicker._showDatepicker(input[0]);
return false;
});