-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Enhancement] Update DatePicker and TimePicker to use DateOnly and TimeOnly structs #1847
Comments
For reference: dotnet/runtime#50980 |
I think to they need think viusally how this works like if date only in the model the time picker element in the picker shoud disappear and vice versus |
@davidbuckleyni |
If someone described time only for example in the model i would expect only s time picker to be displayed if they had date only then the just the date. If that the case then why mention time only |
Sorry, I'm not following :( Currently DatePicker control uses DateTime type for properties. But even though DateTime has both date and time components, DatePicker allows you to select date only. My suggestion is to use DateOnly type to reflect that. Similar situation with TimePicker control, which currently uses TimeSpan type. |
Let's make Core only have the Date / Time parts as appropriate, and then keep the old DateTime in both on the Controls level and just have it wrap the Date/Time only. |
Closing in favour of the updated spec in #1100 which takes care of this and nullable. |
Summary
Recently added DateOnly and TimeOnly structs seem like a much better fit for DatePicker and TimePicker contols.
Although I'm not sure whether such breaking change (comparing to Xamarin.Forms) is allowed.
API Changes
Update DatePicker's properties to have DateOnly types:
Update TimePicker's properties to have TimeOnly types:
The text was updated successfully, but these errors were encountered: