]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Fix `this` reference in _hideDatepicker(). Fixed #7722 - Datepicker:...
authorJay Oster <jay@loyalize.com>
Fri, 16 Sep 2011 00:02:18 +0000 (17:02 -0700)
committerScott González <scott.gonzalez@gmail.com>
Mon, 21 Nov 2011 21:33:22 +0000 (16:33 -0500)
(cherry picked from commit c36b43d0ee3cf7e10d82d21e3a4ca6cb954f4c16)

ui/jquery.ui.datepicker.js

index e84535debfa9bf4d0aeaedca73e83a6223f32d1c..6ee1ae6b43df14184dad15529bb30430bc52f927 100644 (file)
@@ -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);