]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Fix `this` reference in _hideDatepicker(). Fixed #7722 - Datepicker:... 463/head
authorJay Oster <jay@loyalize.com>
Fri, 16 Sep 2011 00:02:18 +0000 (17:02 -0700)
committerJay Oster <jay@loyalize.com>
Fri, 16 Sep 2011 00:02:18 +0000 (17:02 -0700)
ui/jquery.ui.datepicker.js

index 0b6fb2218b3d34b6c3a6c3623c446b97eb4e0cd8..a5ff08c633b69e64524ff44a0ef2e760d7fe49c5 100644 (file)
@@ -807,9 +807,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;
                        };
 
                        // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed