Conversation
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
1 similar comment
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.9%
|
There was a problem hiding this comment.
Pull request overview
This PR enhances FluentCalendar by introducing header interactivity control and a selectable date range via MinDate/MaxDate, with corresponding updates to navigation/title logic, disabled-state computation, demo usage, and new unit tests.
Changes:
- Added
HeaderInteractiveto allow rendering a non-clickable header without prev/next arrows. - Added
MinDate/MaxDaterange support and integrated it into day/month/year disabling and selection logic. - Updated navigation enable/disable behavior and added unit tests + demo examples for the new features.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Core/Components/DateTimes/FluentCalendarTests.razor | Adds unit tests for HeaderInteractive and Min/Max range behavior across views. |
| src/Core/Components/DateTime/FluentCalendarBase.cs | Introduces HeaderInteractive, MinDate, MaxDate and internal range-check helpers; blocks out-of-range selections. |
| src/Core/Components/DateTime/FluentCalendar.razor | Conditionally renders interactive vs static header; passes Min/Max into nested picker calendars. |
| src/Core/Components/DateTime/FluentCalendar.razor.cs | Integrates Min/Max into navigation gating and multi/range selection filtering. |
| src/Core/Components/DateTime/CalendarTitles.cs | Extends prev/next disabled logic to account for Min/Max range. |
| src/Core/Components/DateTime/FluentCalendarDay.cs | Ensures day disabled logic accounts for Min/Max range. |
| src/Core/Components/DateTime/FluentCalendarMonth.cs | Ensures month disabled logic accounts for Min/Max range; minor analyzer suppression around Title formatting. |
| src/Core/Components/DateTime/FluentCalendarYear.cs | Ensures year disabled logic accounts for Min/Max range. |
| examples/Demo/FluentUI.Demo.Client/Documentation/Components/DateTime/Calendar/Examples/CalendarDefault.razor | Demonstrates HeaderInteractive, MinDate, and MaxDate usage in demo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
...uentUI.Demo.Client/Documentation/Components/DateTime/Calendar/Examples/CalendarDefault.razor
Outdated
Show resolved
Hide resolved
- Update previous/next validity logic - Add more tests
dvoituron
left a comment
There was a problem hiding this comment.
I need to run some more tests, but CalendarMonth is no longer working properly with the keyboard: the years scroll by, but I can no longer select the month.
In my opinion, it would be better to create two PRs: one for the header and one for the min/max (which is much more complex).
Getting the |
…e extension methods. moved methods to RangeOfDates
dvoituron
left a comment
There was a problem hiding this comment.
The HeaderInteractive parameter doesn't work with FluentDatePicker
<FluentDatePicker Label="Days view"
HeaderInteractive="false"
@bind-Value="@SelectedValue" />- Remove HeaderInteractive - Address compiles messages - Add MinDate/MaxDate examples - FIx getting stuck in month/year view
- Move getting stuck fix to separate PR
…github.com/microsoft/fluentui-blazor into users/vnbaaij/dev-v5/calendar-enhancements

FluentCalendarMinDateandMaxDateallow you to specify a range in which the calendar can render selectable dates (independently from other influencers likeDisabledDateFunc)Example
Mindate="@(new DateTime(2026, 3, 1))"andMaxDate="@(new DateTime(Today.Year+1, 7, 30))"so january and february of this year can not be selected anymore. Clicking on the year header shows the range with only 2026 and 2027 enabled (second image)MaxDate="@(new DateTime(2030, 1, 1))"set. When reaching the end of the range, Arrow down (next) is not rendered as those years are out of range.Unit tests have been added