Skip to content
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] Add support for CalendarDatePicker on WinUI #1092

Closed
hartez opened this issue May 26, 2021 · 1 comment
Closed

[Enhancement] Add support for CalendarDatePicker on WinUI #1092

hartez opened this issue May 26, 2021 · 1 comment
Assignees
Labels
area-controls-picker Picker fixed-in-6.0.100-preview.6 Look for this fix in 6.0.100-preview.6! proposal/open t/enhancement ☀️ New feature or request

Comments

@hartez
Copy link
Contributor

hartez commented May 26, 2021

Summary

WinUI includes a calendar-style date picking control which would provide an alternative to the DatePicker we currently use: https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/calendar-date-picker

API Changes

Include a CalendarDatePickerHandler which handles the CalendarDatePicker control. We'd also need to add CalendarDatePickerExtensions to mirror the DatePickerExtensions methods.

Optionally, we could also support setting the Date to null (see #1100, where folks are working on this for the current control). The CalendarDatePicker supports de-selecting the currently selected date, so it works without having to add a "clear" button. At this point, it becomes very tempting to just drop the old control entirely.

Intended Use Case

The current DatePicker is not always the best control for choosing a date. It was designed for compact scenarios, so it doesn't provide as much calendar context and doesn't allow for precision in min/max dates beyond limiting the year segment.

Providing an alternative handler and allowing for users to opt-in to that handler would allow for a potentially richer experience on the Windows platform.

Opting in to the alternate handler might look something like this (in application configuration):

#if WINDOWS
.ConfigureHandlers(handlers => handlers.AddHandler<DatePicker, CalendarDatePickerHandler>())
#endif

Difficulty

Super easy, barely an inconvenience.

@hartez
Copy link
Contributor Author

hartez commented Aug 3, 2021

#1404

@ghost ghost locked as resolved and limited conversation to collaborators Feb 19, 2022
@samhouts samhouts added the fixed-in-6.0.100-preview.6 Look for this fix in 6.0.100-preview.6! label Jul 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-picker Picker fixed-in-6.0.100-preview.6 Look for this fix in 6.0.100-preview.6! proposal/open t/enhancement ☀️ New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants