telerik / kendo-angular

Issue tracker - Kendo UI for Angular
http://www.telerik.com/kendo-angular-ui/
Other
466 stars 215 forks source link

[DateRangePopupComponent] Changes to the start date without opening the date range popup lead to the error #4357

Closed YuliiaZas closed 3 weeks ago

YuliiaZas commented 1 month ago

Describe the bug When the date is changing in the start date input without opening a DateRangePopup, the error occurs: "TypeError: Cannot set properties of undefined (setting 'shouldHoverWhenNoStart')" inside subscription to this.dateRangeService.startInput$?.value?.valueChange in DateRangePopupComponent (this.calendar is undefined in this case).

To Reproduce Steps to reproduce the behavior:

  1. Open one of the examples in the documentation, for example, https://www.telerik.com/kendo-angular-ui/components/dateinputs/daterange/directives/.
  2. Close the popup if it is opened.
  3. Focus on the start date input with a keyboard.
  4. Make changes to the date to call setRange from DateRangeService (use Backspace, Arrows, or just numbers)

Expected behavior It seems there should be an additional check if this.calendar is present to avoid this error

Screenshots https://github.com/user-attachments/assets/f27712e4-9c8a-4173-97dc-622d9b53f8f6

tswetti commented 3 weeks ago

Fixed in v16.7.1