diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index e84535debfa..6ee1ae6b43d 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);