Browse Source

DateTimePicker: fixed null exception when setting value to null.

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

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

@ -124,7 +124,7 @@ namespace Microsoft.Windows.Controls
if (_calendar != null && _calendar.SelectedDate != newValue)
{
_calendar.SelectedDate = newValue;
_calendar.DisplayDate = newValue.Value;
_calendar.DisplayDate = newValue ?? DateTime.Now;
}
base.OnValueChanged(oldValue, newValue);

Loading…
Cancel
Save