Skip to content

Commit c36b43d

Browse files
author
Jay Oster
committed
Datepicker: Fix this reference in _hideDatepicker(). Fixed #7722 - Datepicker: Does not properly clear current instance when hidden.
1 parent cd73501 commit c36b43d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,9 +807,10 @@ $.extend(Datepicker.prototype, {
807807
if (this._datepickerShowing) {
808808
var showAnim = this._get(inst, 'showAnim');
809809
var duration = this._get(inst, 'duration');
810+
var self = this;
810811
var postProcess = function() {
811812
$.datepicker._tidyDialog(inst);
812-
this._curInst = null;
813+
self._curInst = null;
813814
};
814815

815816
// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed

0 commit comments

Comments
 (0)