'DatePicker' component throws exception when low DateTimes are selected (close to DateTime.MinValue)
See original GitHub issueDescribe the bug
The ‘DatePicker’ component is throwing an exception when selecting a DateTime that represents the DateTime.MinValue (and other low values).
Steps to reproduce (please include code)
<DatePicker TValue="DateTime" Value=@DateTime.MinValue />
Simply clicking on top of the component to choose a date causes the below exception to be thrown.
Exceptions (if any)
System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime. (Parameter 'value') at System.DateTime.AddTicks(Int64 value) at System.DateTime.AddDays(Double value) at AntDesign.Internal.DatePickerDatePanel1.BuildRenderTree(RenderTreeBuilder __builder) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment) at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry) at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
Further technical details
- Seems to be similar to https://github.com/ant-design-blazor/ant-design-blazor/issues/971
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@joaogoncalvesdev Thank you, now I understand what happened.
@anranruye Are you working on this?