MudBaseDatePicker: Don't try to highlight invalid dates#10785
Merged
mikes-gh merged 3 commits intoMudBlazor:devfrom Feb 1, 2025
Merged
MudBaseDatePicker: Don't try to highlight invalid dates#10785mikes-gh merged 3 commits intoMudBlazor:devfrom
mikes-gh merged 3 commits intoMudBlazor:devfrom
Conversation
- update test to consistantly test scenario
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #10785 +/- ##
==========================================
+ Coverage 91.83% 91.85% +0.01%
==========================================
Files 427 427
Lines 13430 13431 +1
Branches 2592 2593 +1
==========================================
+ Hits 12334 12337 +3
Misses 523 523
+ Partials 573 571 -2 ☔ View full report in Codecov by Sentry. |
mikes-gh
reviewed
Feb 1, 2025
| var day = FixDay ?? 1; | ||
|
|
||
| HighlightedDate = new DateTime(year, month, day); | ||
| DateTime.TryParseExact($"{year}-{month}-{day}", "yyyy-M-d", Culture, DateTimeStyles.None, out var date); |
Contributor
There was a problem hiding this comment.
if (DateTime.TryParseExact($"{year}-{month}-{day}", "yyyy-M-d", Culture, DateTimeStyles.None, out var date))
{
HighlightedDate = date
}
Might read a bit easier?
refactor date check
|
Contributor
|
Thanks . Nice use of |
This was referenced Aug 18, 2025
This was referenced Oct 5, 2025
This was referenced Dec 29, 2025
This was referenced Jan 11, 2026
This was referenced Feb 23, 2026
This was referenced Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Highlighted date fails if an invalid fixed day is provided for the current month.
The unit test regarding this scenario was updated to consistently test an invalid fixed date for a predefined current day.
The test passed previously as it simply tested fixed date only, meaning it succeeded in months with 31 days.
How Has This Been Tested?
Unit tests
Type of Changes
Checklist
dev).