Hi.
Is there a way I can bind the RadzenDatePicker
value to TimeOnly
or TimeSpan
property?
Code:
<RadzenDatePicker style="display: block; width: 100%"
@bind-Value="@station.OpenTime"
Name="OpenTime"
TValue="TimeOnly"
ShowTime="true"
HourFormat="12"
TimeOnly="true"/>
Control:
Error:
System.InvalidCastException: Unable to cast object of type 'System.DateTime' to type 'System.TimeOnly'.
at Radzen.Blazor.RadzenDatePicker`1.OnChange()
at Radzen.Blazor.RadzenDatePicker`1.OkClick()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)