From: ryanolton Date: Thu, 12 Jan 2012 16:22:48 +0000 (-0500) Subject: Datepicker: added check to account for multiple pickers on one page. Fixed #5818... X-Git-Tag: 1.9m7~97^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=82cf9e297fd78730dadd9a486d6871eca72455dd;p=jquery-ui.git Datepicker: added check to account for multiple pickers on one page. Fixed #5818 – multiple DatePickers won't trigger close event --- diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 45ddf8678..5915d4027 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -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; });