aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.datepicker.js
diff options
context:
space:
mode:
authorBrant Burnett <btburnett3@gmail.com>2010-02-01 16:10:41 +0000
committerBrant Burnett <btburnett3@gmail.com>2010-02-01 16:10:41 +0000
commit5b61537e6e759cacc4295887200db6ac07086f54 (patch)
treef2c9e202c06423da56defbc12cfca9531f565f25 /ui/jquery.ui.datepicker.js
parenta4daa10f53e9c6aa5a9b5641730fd7576ae6f6f8 (diff)
downloadjquery-ui-5b61537e6e759cacc4295887200db6ac07086f54.tar.gz
jquery-ui-5b61537e6e759cacc4295887200db6ac07086f54.zip
Datepicker: Fixed #4453 UI Datepicker inside UI Dialog Issue
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r--ui/jquery.ui.datepicker.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 789afe1f1..551b22551 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -651,6 +651,10 @@ $.extend(Datepicker.prototype, {
if (inst.input.is(':visible') && !inst.input.is(':disabled'))
inst.input[0].focus();
$.datepicker._curInst = inst;
+
+ // find the dialog wrapping the input, if any, and bind to close event
+ inst._dialog = $(input).closest('.ui-dialog-content')
+ .bind('dialogclose.datepicker', function() { $.datepicker._hideDatepicker(input); });
}
},
@@ -775,6 +779,9 @@ $.extend(Datepicker.prototype, {
}
}
this._inDialog = false;
+
+ if (inst._dialog)
+ inst._dialog.unbind('dialogclose.datepicker');
}
},