-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Poc for Generic typed Date Picker #8567
Conversation
I think version 7.0.0 is the perfect time for this PR. With full test coverage of the different implementations of IDateOperations etc I see no problems. @ScarletKuro do you want to do a quick glance if the concept is sound? |
Just curious. Why did you design it like this |
If we going to accept this solution, the protected T? _value; instead of [Parameter]
public abstract T Value { get; set; } and components are forced to do this: [Parameter]
[Category(CategoryTypes.FileUpload.Behavior)]
public T? Files
{
get => _value;
set
{
if (_value != null && _value.Equals(value))
return;
_value = value;
}
} |
@ArieGato We decided against generics and for just having two different bindable properties: #2954 (reply in thread) Are you ok with that? |
I think there are pro's and cons for both solutions. My intentions were to bind the datepicker to a model without any conversions. The NumericField works simular to this. I'm curious how the OneOf solution works out in usage. And shouldn't we add DateTimeOffset support as well? |
Ok, that seems to kill the Two-Properties-Solution |
If the original binding was changed to |
Technically, yes. |
Reworked in branch https://github.com/ArieGato/MudBlazor/tree/feature/generic-datepicker |
Oh, you haven't created a PR yet. OK, we'll link once you do. |
Continues in PR #9016 |
Description
How Has This Been Tested?
Types of changes
Checklist:
dev
).