radzenhq / radzen-blazor

Radzen Blazor is a set of 90+ free native Blazor UI components packed with DataGrid, Scheduler, Charts and robust theming including Material design and FluentUI.
https://www.radzen.com
MIT License
3.52k stars 785 forks source link

DatePicker bug #189

Closed ThomasShiu closed 3 years ago

ThomasShiu commented 3 years ago

DatePicker bug When I use DatePicker,Then I selected a date and throw a error.Even onchange event not fire.

<RadzenDatePicker Name="dt_1"   TValue="string" DateFormat="yyyy/MM/dd" />

blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Specified cast is not valid. System.InvalidCastException: Specified cast is not valid. at Radzen.Blazor.RadzenDatePicker1.<OnChange>d__137[[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() at Radzen.Blazor.RadzenDatePicker1.d139[[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() at Radzen.Blazor.RadzenDatePicker`1.<>cDisplayClass0_0.<b__8>d[[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

Screenshots radzen_dt_error

Desktop (please complete the following information):

enchev commented 3 years ago

TValue cannot be string, only DateTime and DateTime? are supported