aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorryanolton <oltonr@gmail.com>2012-01-12 11:22:48 -0500
committerScott González <scott.gonzalez@gmail.com>2012-01-20 11:27:19 -0500
commit120ee58e5baff8f6248987bca22bc4deb0380504 (patch)
treecc59cd9a08fbab333f56049252d696bb4f540d15
parent5953d194a343f90d90bfb04df2a5f0724555f6eb (diff)
downloadjquery-ui-120ee58e5baff8f6248987bca22bc4deb0380504.tar.gz
jquery-ui-120ee58e5baff8f6248987bca22bc4deb0380504.zip
Datepicker: added check to account for multiple pickers on one page. Fixed #5818 – multiple DatePickers won't trigger close event(cherry picked from commit 82cf9e297fd78730dadd9a486d6871eca72455dd)
-rw-r--r--ui/jquery.ui.datepicker.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 6ee1ae6b4..fbf1f4c45 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;
});