diff --git a/src/MahApps.Metro/Controls/TimePicker/DateTimePicker.cs b/src/MahApps.Metro/Controls/TimePicker/DateTimePicker.cs index 34277f522c..a5c4a1fda9 100644 --- a/src/MahApps.Metro/Controls/TimePicker/DateTimePicker.cs +++ b/src/MahApps.Metro/Controls/TimePicker/DateTimePicker.cs @@ -140,6 +140,7 @@ protected override void ApplyBindings() if (_calendar != null) { + _calendar.SetBinding(Calendar.SelectedDateProperty, GetBinding(SelectedDateTimeProperty)); _calendar.SetBinding(Calendar.DisplayDateProperty, GetBinding(DisplayDateProperty)); _calendar.SetBinding(Calendar.DisplayDateStartProperty, GetBinding(DisplayDateStartProperty)); _calendar.SetBinding(Calendar.DisplayDateEndProperty, GetBinding(DisplayDateEndProperty)); @@ -270,7 +271,7 @@ private void SetDatePartValues() var dateTime = GetSelectedDateTimeFromGUI(); if (dateTime != null) { - DisplayDate = dateTime.Value > DateTime.MinValue && dateTime.Value < DateTime.MaxValue ? dateTime.Value : DateTime.Today; + this.SetCurrentValue(DisplayDateProperty, dateTime.Value > DateTime.MinValue && dateTime.Value < DateTime.MaxValue ? dateTime.Value : DateTime.Today); if ((SelectedDateTime != DisplayDate && SelectedDateTime != DateTime.MinValue) || (Popup != null && Popup.IsOpen)) { this.SetCurrentValue(SelectedDateTimeProperty, DisplayDate);