datepicker bug

1 Answer 46 Views
DatePicker
Bruno
Top achievements
Rank 1
Iron
Bruno asked on 19 Feb 2024, 12:49 PM
I use the TelerikDatePicker: I enter a date and I remove it again, then I click on the calendar icon and I receive an exception...



Microsoft.AspNetCore.Components.Web.ErrorBoundary | Message: Unhandled exception rendering component: "Object reference not set to an instance of an object."
System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Blazor.Components.TelerikDatePicker`1.get_AriaActiveDescendant()
   at Telerik.Blazor.Components.TelerikDatePicker`1.<>c__DisplayClass111_0.<BuildRenderTree>b__2(RenderTreeBuilder __builder2)
   at Microsoft.AspNetCore.Components.CascadingValue`1.Render(RenderTreeBuilder builder)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 21 Feb 2024, 03:06 PM

Hello Bruno,

The occurrence of this error can be attributed to a race condition triggered by rapid, multiple UI refreshes. In this scenario, the DatePicker undergoes multiple recreations in quick succession. Consequently, the nested Calendar component is destroyed, rendering it inaccessible to the DatePicker and resulting in the observed exception.

For further information about this problem, you can check our forum, where another customer is having the same issue as you. My colleague has provided some advice and the potential reasons that could be causing the problem.

Regards,
Tsvetomir
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Tags
DatePicker
Asked by
Bruno
Top achievements
Rank 1
Iron
Answers by
Tsvetomir
Telerik team
Share this question
or