Browse Source

DateTimePicker: fixed rare issue with calendar not selecting the value

pull/1645/head
brianlagunas_cp 14 years ago
parent
commit
f2903f468f
  1. 2
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Implementation/DateTimePicker.cs

2
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Implementation/DateTimePicker.cs

@ -112,7 +112,7 @@ namespace Microsoft.Windows.Controls
protected override void OnValueChanged(DateTime? oldValue, DateTime? newValue) protected override void OnValueChanged(DateTime? oldValue, DateTime? newValue)
{ {
if (_calendar != null && _calendar.SelectedDate.HasValue && newValue.HasValue && _calendar.SelectedDate.Value != newValue.Value) if (_calendar != null && _calendar.SelectedDate != newValue)
{ {
_calendar.SelectedDate = newValue; _calendar.SelectedDate = newValue;
_calendar.DisplayDate = newValue.Value; _calendar.DisplayDate = newValue.Value;

Loading…
Cancel
Save