Skip to content

Commit

Permalink
Datepicker: removes div when destroyed
Browse files Browse the repository at this point in the history
Co-authored-by: DawnSovereign <jason.t.kim2@gmail.com>
  • Loading branch information
porterclev and DawnSovereign committed Jul 15, 2024
1 parent d19d80e commit 5e4f1b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/widgets/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ $.extend( Datepicker.prototype, {

nodeName = target.nodeName.toLowerCase();
$.removeData( target, "datepicker" );
$.datepicker._hideDatepicker();
if ( nodeName === "input" ) {
inst.append.remove();
inst.trigger.remove();
Expand All @@ -436,9 +435,11 @@ $.extend( Datepicker.prototype, {
$target.removeClass( this.markerClassName ).empty();
}

inst.dpDiv.remove();
if ( datepicker_instActive === inst ) {
datepicker_instActive = null;
this._curInst = null;
this.dpDiv = null;
}
},

Expand Down

0 comments on commit 5e4f1b8

Please sign in to comment.