Skip to content

Datepicker: programmatically destroy don't work anymore #2178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
differens opened this issue Jul 24, 2023 · 5 comments
Closed

Datepicker: programmatically destroy don't work anymore #2178

differens opened this issue Jul 24, 2023 · 5 comments

Comments

@differens
Copy link

differens commented Jul 24, 2023

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

es--anomalie

Problem not occurs in 1.12.1.

Thank you in advance.

@porterclev
Copy link
Contributor

I'm working on this

@JasonKimy
Copy link

I will be helping to contribute to this.

@tchan102
Copy link

I will be working on this issue!

@porterclev
Copy link
Contributor

porterclev commented Jul 8, 2024

@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
Sequence 01_9

Proposed Fix
Sequence 01_5

@mgol
Copy link
Member

mgol commented Aug 1, 2024

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 #2268 (comment).

@mgol mgol closed this as completed in 02a6e6b Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants