-
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
Datepicker Two-Way Binding On Android #9180
Comments
I'm having the same issue (using Windows platform)... it seems like the |
Same problem using visual studio 2022 17.4.0 Preview 1.0 with MAUI. Setting the Datepickers Date to ViewModel observableProperty via Binding and changing the binding source value does not update to the Datepicker. Datepicker only shows todays date and Binding do not change it. |
@samhouts Could you reconsider this item? Having the Date binding not work on Android is the mainline, most basic scenario for this control, which leaves it broken out of the box. It seems like it shouldn't be in the backlog. |
Description
I'm having an issue with DatePicker's behavior and am going to assume it is a bug.
Here is what our DatePicker looks like in XAML:
DateValue is a property that belongs to the CustomFormField model. A DateValue of null is an acceptable value within the CustomFormField. When the picker renders on screen, it displays today's date by default (when TextValue starts at null):
If you click on the DatePicker and attempt to select today's date, the DateSelected event is not fired therefore failing to bind to the new date. The only way to fire the DateSelected event is to select a different date on the DatePicker and then go back and select today's date.
(Since I am not testing on iOS, I cannot confirm if this is a bug on iOS)
Steps to Reproduce
Version with bug
6.0.400
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 12
Did you find any workaround?
My terrible and unacceptable workaround is setting model properties in the code behind.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: