Description
Hello,
When you bind a DatePicker MinimumDate and MaximumDate to a ViewModel, the first time the pop up opens, it displays correctly.
However, after the first display, if you change the MaximumDate/minimumDate in the ViewModel, the popup will open with the first values, not the updated ones.
If you need any other information don't hesitate, or if I'm doing it wrong please let me know.
Regards.
Steps to Reproduce
-
Create a date picker and bind it.
-
In your view model, set the MaximumDate.
-
Open the popup, everything ok.
-
Close the pop up.
-
In your viewmodel, change the MaximumDate.
-
Open the popup, it stucks to the old maximum date.
I tried with Datetime? or DateTime, same issue.
Link to public reproduction project repository
No response
Version with bug
10.0.30
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
I also tried do send a weakReferenceMessenger to my View to change the data directly from it, but same thing. Please note that in this case, if you force with :
EndDatePicker.IsEnabled = false;
await Task.Yield();
EndDatePicker.MinimumDate = null;
EndDatePicker.IsOpen = true;
await Task.Yield();
EndDatePicker.IsOpen = false;
EndDatePicker.MinimumDate = _viewModel.StartDate;
await Task.Yield();
EndDatePicker.IsEnabled = true;
When you open again the DatePicker he is updated with the good date. But it will work only one time.
Relevant log output
Description
Hello,
When you bind a DatePicker MinimumDate and MaximumDate to a ViewModel, the first time the pop up opens, it displays correctly.
However, after the first display, if you change the MaximumDate/minimumDate in the ViewModel, the popup will open with the first values, not the updated ones.
If you need any other information don't hesitate, or if I'm doing it wrong please let me know.
Regards.
Steps to Reproduce
Create a date picker and bind it.
In your view model, set the MaximumDate.
Open the popup, everything ok.
Close the pop up.
In your viewmodel, change the MaximumDate.
Open the popup, it stucks to the old maximum date.
I tried with Datetime? or DateTime, same issue.
Link to public reproduction project repository
No response
Version with bug
10.0.30
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
I also tried do send a weakReferenceMessenger to my View to change the data directly from it, but same thing. Please note that in this case, if you force with :
EndDatePicker.IsEnabled = false;
await Task.Yield();
EndDatePicker.MinimumDate = null;
EndDatePicker.IsOpen = true;
await Task.Yield();
EndDatePicker.IsOpen = false;
EndDatePicker.MinimumDate = _viewModel.StartDate;
await Task.Yield();
EndDatePicker.IsEnabled = true;
When you open again the DatePicker he is updated with the good date. But it will work only one time.
Relevant log output