Kendo UI Date Range Picker - Calendar won't close after updating to version 2023.3.1114

1 Answer 23 Views
Calendar DateRangePicker Popover
Christian
Top achievements
Rank 1
Iron
Christian asked on 28 Jan 2024, 09:54 PM | edited on 28 Jan 2024, 10:02 PM

Hi there,

After updating to version 2023.3.1114, I found that the calendar at Kendo UI Date Range Picker won't closed automatically after selecting the start and end date. This happened particularly when I change the max date inside the "Change" Event.

$("#date-range-picker").data("kendoDateRangePicker").max(new Date(2024, 1, 14));

I was able to replicate the issue at Kendo UI JQuery dojo: https://dojo.telerik.com/UfOcUZaY/3

However the issue can't be replicated at the following REPL: https://netcorerepl.telerik.com/?_gl=1*12uzyp6*_ga*ODY4MDY0MTk4LjE3MDY0NzY2ODc.*_ga_9JSNBCSF54*MTcwNjQ3NjY4Ni4xLjEuMTcwNjQ3NzM2NC44LjAuMA..*_gcl_au*MTM5NDI2ODE3Ny4xNzA2NDc2Njg3

Turned out the page still using version 2023.3.1010.

Is this change intended?

Is there a workaround? I have tried to close the calendar manually after checking if the range.start and range.end available. But didn't quite work well. It may close the calendar even if I only select the start date.

Appreciate your support. Thank you.

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 31 Jan 2024, 12:06 PM

Hi Christian,

The behavior is due to a race condition. You can workaround it by executing the logic in the change event handler with a slight delay, e.g., a timeout of 0ms works:

setTimeout(function() {
  $("#daterangepicker").data("kendoDateRangePicker").max(new Date(2024, 1, 14));
}, 0)

https://dojo.telerik.com/UfOcUZaY/5

As for the REPL, we are aware of it using the old version scripts. We are working on fixing it.

Regards,
Ivan Danchev
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.
Christian
Top achievements
Rank 1
Iron
commented on 01 Feb 2024, 08:44 PM

Hi Ivan,

Many thanks for the workarounds. It works.

Will this issue be addressed in the future update, so that the workaround is not needed?

 

Kind Regards,

Christian

Ivan Danchev
Telerik team
commented on 06 Feb 2024, 02:27 PM

Christian,

It is unlikely that this will be addressed, since the problem is caused by attempting to execute two operations at the same time: change the state of the component (setting a new max value), while it is in the process of saving a change in its state (the new value selected by the user).

Regards,
Ivan Danchev
Progress Telerik

Telerik

Tags
Calendar DateRangePicker Popover
Asked by
Christian
Top achievements
Rank 1
Iron
Answers by
Ivan Danchev
Telerik team
Share this question
or