-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Implement more WinUI DatePickerHandler properties #859
Conversation
|
||
nativeDatePicker.UpdateDay(datePicker); | ||
nativeDatePicker.UpdateMonth(datePicker); | ||
nativeDatePicker.UpdateYear(datePicker); | ||
} | ||
|
||
public static void UpdateDate(this DatePicker nativeDatePicker, DateTime dateTime) | ||
{ | ||
nativeDatePicker.Date = new DateTimeOffset(new DateTime(dateTime.Ticks, DateTimeKind.Unspecified)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this handle the Format ?
This is a limitation of the WinUI DatePicker; it can only restrict the selectable years: https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls.datepicker?view=winui-3.0#date-values So the best we can do out of the box is set MinYear and MaxYear. Hopefully at some point we can include support for the CalendarDatePicker, where MinimumDate/MaximumDate is more useful. |
* Implement more properties in WinUI DatePickerHandler * Mapped native DateChanged event * Fix broken tests * Enable nullable in WinUI DatePickerHandler * Fix build error
Description of Change
Implement more WinUI DatePickerHandler properties:
PR Checklist
Does this PR touch anything that might effect accessibility?
No