mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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:
parent
5953d194a3
commit
120ee58e5b
5
ui/jquery.ui.datepicker.js
vendored
5
ui/jquery.ui.datepicker.js
vendored
@ -233,7 +233,10 @@ $.extend(Datepicker.prototype, {
|
|||||||
inst.trigger.click(function() {
|
inst.trigger.click(function() {
|
||||||
if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
|
if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
|
||||||
$.datepicker._hideDatepicker();
|
$.datepicker._hideDatepicker();
|
||||||
else
|
else if ($.datepicker._datepickerShowing && $.datepicker._lastInput != input[0]) {
|
||||||
|
$.datepicker._hideDatepicker();
|
||||||
|
$.datepicker._showDatepicker(input[0]);
|
||||||
|
} else
|
||||||
$.datepicker._showDatepicker(input[0]);
|
$.datepicker._showDatepicker(input[0]);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user