Hello,
I am currently using the SfDateRangePicker and when we have a date that comes back for 2022 we get the error below when trying to change the date.
blazor.server.js:19 [2022-01-12T19:01:34.248Z] Error: System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.
at System.DateTime..ctor(Int32 year, Int32 month, Int32 day)
at Syncfusion.Blazor.Calendars.SfDateRangePicker`1.SelectStartMonth()
at Syncfusion.Blazor.Calendars.SfDateRangePicker`1.Show()
at Syncfusion.Blazor.Calendars.SfDateRangePicker`1.DateRangeIconHandler()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
Here is the code i am using in the Razor page.
<SfDateRangePicker Enabled="@dateRangePickerIsEnabled" TValue="DateTime?" Min="@MinDate" Max="@MaxDate" @bind-StartDate="@StartDate" @bind-EndDate="@EndDate" Placeholder="Choose a Range">
<DateRangePickerEvents TValue="DateTime?" ValueChange="ApplyFilters"></DateRangePickerEvents>
</SfDateRangePicker>
Hello Ponmani M,
That data that I am receiving is in the same format as it has always been. This issue has just started when we use any date in January 2022.
I have changed the data that is being returned for the @MaxDate variable from
'2022-01-12 18:12:42.3698958' to '2022-02-12 18:12:42.3698958'
and I do not get this error. This error only happens when the month is 01.
Ok, thanks.
Hi Kimberly,
Thanks for the update. Please get back to us if you need any further assistance.
Regards,
Udhaya Kumar D