MudDatePicker: Prevent ArgumentOutOfRangeException at DateTime boundaries#12378
MudDatePicker: Prevent ArgumentOutOfRangeException at DateTime boundaries#12378ScarletKuro merged 10 commits intodevfrom
Conversation
…t date limits Co-authored-by: ScarletKuro <[email protected]>
danielchalmers
left a comment
There was a problem hiding this comment.
Should reference DateTime.MaxValue directly instead of magic numbers 1 & 9999, and the comments should acknowledge the restriction is based on DateTime.
|
@copilot base the restrictions based on |
Co-authored-by: ScarletKuro <[email protected]>
Updated in commit 4baeea4. Now using |
Remove IsRange (not used anywwher), Simplify IsDateDisabledFunc
|
@copilot actually, can you verify that we don't need to use Instead of the On top I found another critical bug, if we open the it yields which means its a bug in our code since there is no days with two "6" days. Keep in mind that with my culture the calendar uses |
... I've made significant progress on all three issues you raised: 1. Calendar Boundaries (DateTime vs Calendar.MinSupportedDateTime/MaxSupportedDateTime) Verified and fixed! Persian calendar has
2. GetMonthStart Method Refactored in commit 3996be3 to use calendar boundaries instead of hard-coded 9999. The method now correctly handles max boundary with 3. Duplicate "6" Bug Fixed Status:
Working on final test fixes. |
|
Meh copilot can't fix it all at one go, I guess i will revert last 3 commits with and the |
Fix MudDatePicker ArgumentOutOfRangeException when navigating beyond date limits
Summary:
Fixed the
ArgumentOutOfRangeExceptionthat occurred when clicking navigation arrows at the boundaries ofDateTime.MinValue (0001/01/01)andDateTime.MaxValue (9999/12/31). The navigation arrows now behave consistently at both minimum and maximum date boundaries - they remain visible but clicking them does nothing (no exception thrown).Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.