summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Oster <jay@loyalize.com>2011-09-15 17:02:18 -0700
committerScott González <scott.gonzalez@gmail.com>2011-11-21 16:33:22 -0500
commit63bd71f14cac1f46fd5cfc6f157abf0bf710d347 (patch)
treec6ae340fe9d6df6cdd74013d0c32306f339cf3eb
parentf7b28df28809bca05623b7394919d15919334afb (diff)
downloadjquery-ui-63bd71f14cac1f46fd5cfc6f157abf0bf710d347.tar.gz
jquery-ui-63bd71f14cac1f46fd5cfc6f157abf0bf710d347.zip
Datepicker: Fix `this` reference in _hideDatepicker(). Fixed #7722 - Datepicker: Does not properly clear current instance when hidden.
(cherry picked from commit c36b43d0ee3cf7e10d82d21e3a4ca6cb954f4c16)
-rw-r--r--ui/jquery.ui.datepicker.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index e84535deb..6ee1ae6b4 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -797,9 +797,10 @@ $.extend(Datepicker.prototype, {
if (this._datepickerShowing) {
var showAnim = this._get(inst, 'showAnim');
var duration = this._get(inst, 'duration');
+ var self = this;
var postProcess = function() {
$.datepicker._tidyDialog(inst);
- this._curInst = null;
+ self._curInst = null;
};
if ($.effects && $.effects[showAnim])
inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);