diff options
author | Porter Clevidence <116387727+porterclev@users.noreply.github.com> | 2024-08-05 10:30:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-05 19:30:53 +0200 |
commit | 02a6e6bcb004696b21324ef14c07374a56d7cd02 (patch) | |
tree | 74b31f0f8bee8eaf38416ac0b5cc9378925ce43b /ui/widgets | |
parent | a0c5b12e8291e40cf43c61844d50a5f7fdfe021a (diff) | |
download | jquery-ui-02a6e6bcb004696b21324ef14c07374a56d7cd02.tar.gz jquery-ui-02a6e6bcb004696b21324ef14c07374a56d7cd02.zip |
Datepicker: Hide the UI on destroy
When the datepicker UI is shown and then destroyed programmatically:
```js
$( "#datepicker" ).datepicker( "destroy" );
```
hide the datepicker UI without the need for an explicit user action.
Previously, in 1.12 the UI would not disappear immediately but only after the
first `mousedown`. In later 1.13 versions, the UI would not disappear at all.
Fixes gh-2178
Closes gh-2268
Diffstat (limited to 'ui/widgets')
-rw-r--r-- | ui/widgets/datepicker.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/widgets/datepicker.js b/ui/widgets/datepicker.js index 605760572..323723b89 100644 --- a/ui/widgets/datepicker.js +++ b/ui/widgets/datepicker.js @@ -435,6 +435,7 @@ $.extend( Datepicker.prototype, { $target.removeClass( this.markerClassName ).empty(); } + $.datepicker._hideDatepicker(); if ( datepicker_instActive === inst ) { datepicker_instActive = null; this._curInst = null; |