Datepicker: programmatically destroy don't work anymore
After upgrading from version 1.12.1 to 1.13.2 the method datepicker( "destroy" ) do not close and destroy the calendar ui.
I have prepared an example at the link below.
https://jsfiddle.net/7kdwvgp8/
After starting the execution just open the calendar and wait for the timeout which calls the destroy after 5 seconds. The result is that the calendar remains open and each iteration leads to an error
Problem not occurs in 1.12.1.
Thank you in advance.
I'm working on this
I will be helping to contribute to this.
I will be working on this issue!
@fnagel When comparing the two versions, we found that on version 1.12.1, the widget will only hide after being destroyed once the user clicks on another part of their screen. Would you prefer to have the widget disappear when destroyed or only hide the date picker once the user clicks away?
1.12.1 Functionality
Proposed Fix
Note that the description here is not fully correct - in 1.12.1, the datepicker UI was not hidden on destroy either! It was just hidden after the first mousedown. If you just hovered over the datepicker or clicked on any of its elements, you'd get lots of console errors even in 1.12.1.
But yes, the 1.13.2-1.13.3 behavior is worse since there's no way to get rid of the widget from the user perspective, irrespective of the underlying errors.
More info at https://github.com/jquery/jquery-ui/pull/2268#issuecomment-2262670431.