Browse Source

DateTimePicker: fixed issue with custom format and binding the same dateTime to multiple DateTime controls.

pull/1645/head
brianlagunas_cp 15 years ago
parent
commit
8e22d5cf2c
  1. 5
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeUpDown.cs

5
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/DateTimeUpDown/Implementation/DateTimeUpDown.cs

@ -55,7 +55,10 @@ namespace Microsoft.Windows.Controls
{
_dateTimeParser.Format = GetFormatString(newValue);
InitializeDateTimeInfoListAndParseValue();
Text = ConvertValueToText();
//I forgot why I set the text here. I believe it had to deal with databinding to the format. Either way we need to make sure there is a value before we try to set the text.
if (Value.HasValue)
Text = ConvertValueToText();
}
#endregion //Format

Loading…
Cancel
Save