Browse Source

DateTimePicker: fixed rare issue with calendar not selecting the value

import/raw
brianlagunas_cp 15 years ago
parent
commit
3fa55d0b79
  1. 2
      Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimePicker/Implementation/DateTimePicker.cs

2
Main/Source/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