When using the RadzenDatePicker if the user types an invalid value for the hour or minute into the input the control crashes upon trying to update the value with the following exception:
blazor.server.js:15 [2020-07-06T10:23:11.964Z] Error: System.NullReferenceException: Object reference not set to an instance of an object.
at Radzen.Blazor.RadzenDatePicker`1.ParseDate()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
This is the code I'm using:
<RadzenDatePicker ShowTime="true"
@bind-Value="DateTime"
DateFormat="dd-MM-yyyy HH:mm"
HourFormat="24"
TValue="DateTime" />
@code {
private int currentCount = 0;
private DateTime DateTime { get; set; } = DateTime.Now;
}
I guess it probably doesn't check / sanitize the inputs before attempting to parse? It seems to happen with the date part too.
The issue should be pretty easy to reproduce (just type 99 into the hour part) but I can provide a sample if you need.
Radzen.Blazor 2.10.11 using Blazor Server Side.