]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: added check to account for multiple pickers on one page. Fixed #5818... 569/head
authorryanolton <oltonr@gmail.com>
Thu, 12 Jan 2012 16:22:48 +0000 (11:22 -0500)
committerryanolton <oltonr@gmail.com>
Thu, 12 Jan 2012 16:22:48 +0000 (11:22 -0500)
ui/jquery.ui.datepicker.js

index 45ddf8678e223d813c1641de48a2095e22ae825c..5915d402770adf88d8dd7b8c9bc3c811d08d12ed 100644 (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;
                        });