-
Notifications
You must be signed in to change notification settings - Fork 459
[dev-v5] Convert the Calendar and DatePicker components to a generic type #4153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dvoituron
merged 41 commits into
dev-v5
from
users/dvoituron/dev-v5/poc-calendar-generic
Oct 2, 2025
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
bf82d2c
Refactor FluentCalendar components to support generic TValue type for…
dvoituron 54276fc
Refactoring CalendarTValue convert methods
dvoituron afb9ad9
Refacroring to extension methods
dvoituron 7a3257a
Refactored `FluentCalendar.razor.cs` to use generic type `TValue` for…
dvoituron cd81cfc
Converted `PickerDay`, `PickerMonth`, and `PickerYear` to nullable ty…
dvoituron a122b4e
Refactor calendar components for nullable date handling
dvoituron 14670be
Fix Unit Tests
dvoituron 74a44e6
Refactoring
dvoituron 482d831
Refactoring
dvoituron 948165c
Remove "where TValue : struct, IComparable"
dvoituron d8a5045
Update example
dvoituron b0b7480
Refactoring
dvoituron e3da2c8
Refactoring
dvoituron 3a555f7
Refactoring
dvoituron 1ffebf6
Refactoring
dvoituron 7145c26
Refactoring
dvoituron 127ec79
Refactoring
dvoituron 687f81b
Refactoring
dvoituron 2b906d5
refactoring and add CalendarTypes example
dvoituron 1b48006
Refactoring
dvoituron 4db5db8
Refactoring
dvoituron c7bbdac
Refactoring
dvoituron 6e8aca3
Fix Unit Tests
dvoituron 0a91bd6
add comments
dvoituron 73caccd
Rename IsNull to IsNullOrDefault and update usage
dvoituron 7d7ceaf
Add Unit Tests
dvoituron 622b2fa
Refactoring
dvoituron 61929f9
Fix some Unit Tests
dvoituron f85a0f2
Fix Unit Tests
dvoituron 78cf26d
Update Unit Tests
dvoituron 559d4f0
Update parsing logic to handle invalid date inputs and adjust validat…
dvoituron 698b7fd
Update Demo
dvoituron 1abe8e8
Merge from dev-v5
dvoituron 130490d
Update doc
dvoituron 4fcfdca
Add TValue Unit Tests
dvoituron 3d43b04
Add Unit Tests
dvoituron 80e3529
Merge branch 'dev-v5' into users/dvoituron/dev-v5/poc-calendar-generic
vnbaaij 6599d03
Merge branch 'dev-v5' into users/dvoituron/dev-v5/poc-calendar-generic
dvoituron 8835627
Merge branch 'dev-v5' into users/dvoituron/dev-v5/poc-calendar-generic
dvoituron 967280f
Update PR comments
dvoituron f25dc87
Fix PR comments
dvoituron File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
14 changes: 14 additions & 0 deletions
14
...entUI.Demo.Client/Documentation/Components/DateTime/Calendar/Examples/CalendarTypes.razor
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <FluentStack Wrap="true" HorizontalGap="24px"> | ||
| <FluentDatePicker Label="DateTime?" @bind-Value="@NullableDateTime" Width="140px" /> | ||
| <FluentDatePicker Label="DateTime" @bind-Value="@DateTime" Width="140px" /> | ||
| <FluentDatePicker Label="DateOnly?" @bind-Value="@NullableDateOnly" Width="140px" /> | ||
| <FluentDatePicker Label="DateOnly" @bind-Value="@DateOnly" Width="140px" /> | ||
| </FluentStack> | ||
|
|
||
| @code | ||
| { | ||
| private DateTime? NullableDateTime; | ||
| private DateTime DateTime = DateTime.Today; | ||
| private DateOnly? NullableDateOnly; | ||
| private DateOnly DateOnly = DateOnly.FromDateTime(DateTime.Today); | ||
| } |
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
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
2 changes: 1 addition & 1 deletion
2
...Demo.Client/Documentation/Components/DateTime/DatePicker/Examples/DatePickerDefault.razor
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| <div> | ||
| <div> | ||
| <b>Selected Date:</b> @(SelectedValue?.ToString("yyyy-MM-dd")) | ||
| </div> | ||
|
|
||
|
|
||
2 changes: 2 additions & 0 deletions
2
...t/Documentation/Components/DateTime/DatePicker/Examples/DatePickerDoubleClickToDate.razor
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| | ||
| <FluentDatePicker @bind-Value="@SelectedValue" | ||
| DoubleClickToDate="@DateTime.Today" /> | ||
| @code | ||
| { | ||
| DateTime? SelectedValue = DateTime.Today.AddDays(-2); | ||
| } | ||
|
|
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.