From ff603547b36518f383997ebe58fcb15966e0fcbf Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Wed, 18 Dec 2019 23:23:34 +0800 Subject: [PATCH] close #256 --- .../HandyControl_Shared/Controls/Input/DateTimePicker.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs b/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs index 17daef50..06bb6454 100644 --- a/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs +++ b/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs @@ -622,6 +622,11 @@ namespace HandyControl.Controls if (SelectedDateTime != null) { + if (SelectedDateTime != DisplayDateTime) + { + SetCurrentValue(DisplayDateTimeProperty, SelectedDateTime); + } + var selectedTime = DateTimeToString(SelectedDateTime.Value); if (string.Compare(selectedTime, s, StringComparison.Ordinal) == 0)