Permalink
Browse files

Datepicker: Fix `this` reference in _hideDatepicker(). Fixed #7722 - …

…Datepicker: Does not properly clear current instance when hidden.

(cherry picked from commit c36b43d)
  • Loading branch information...
1 parent f7b28df commit 63bd71f14cac1f46fd5cfc6f157abf0bf710d347 Jay Oster committed with scottgonzalez Sep 16, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 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);

0 comments on commit 63bd71f

Please sign in to comment.