Hi James,
Please ignore the previous update.
We have modified your last updated sample to meet your requirement.
In this sample we have changed type of SelectedDate
in your view model as object.
The type of SelectedDate is object. So if we select the
already selected date the SelectedDate property return the null(default value
of object) value . But if we set SelectedDate as DateTime it will return its
default value(DateTime.Min) . Due to this reason the SelectedDate changed to
DateTime.Min. Please find the sample from the attached file.
Please let us know if the above sample meets your
requirements or not.
Note: If you want to maintain SelectedDate as DateTime.
Please skip the default value of DateTime before setting the SelectedDate property as
like in below code snippet.
set { if ((DateTime)value != DateTime.MinValue) { if (!_monthArrowPressed
&& !value.Equals(_selectedDate)) { Set(ref _selectedDate, value);
RaisePropertyChanged(() => DisplayFormattedDate); CalendarIsOpen = false;
_dateSelectedCommand.ExecuteAsync((DateTime)_selectedDate); } } |
Regards,
Rajkumar G