These cultures use date stamps like 22.10.2014 1:05:07, 100
Iff you dont provide a custom FormatString the control will display, but wont allow interaction and will throw an uncaught exception if you attempt to open the calendar.
Additionally iff you stipulate a FormatString in XAML the app will crash with an XAML exception.
I tracked this bug in V 2.3 to the following:
DateTimeUpDown.cs line 559 - DateTime date = DateTime.Parse(Value.ToString());
I am not sure why this is there, Value is already a DateTime? so you can easily check if its null and if not extract the date time directly without using parse (an absolute nightmare function btw). Also upstream the Value is checked for null so worrying about null SHOULDN'T be an issue, although this would choke on null anyways.
My fix was: DateTime date = Value.Value;
Would still break on null, but SHOULD be safe to assume thats not an issue.
Maybe I am just having weird issues, but seems to be a bug to me.
Hope this helps :D
Comments: ** Comment from web user: Dysl3xik **
I am not certain if it makes a difference but I didn't get the bug by modifying my apps culture. I actually made the change in windows under Control panel -> language and regions settings.
Note that oddly enough manually changing my date time display properties didn't cause the bug it ONLY appeared when I actually changed the culture settings in windows, even if my custom date time format was that of the foreign culture.
Anyways ill throw some code in here....
```
<StackPanel>
<Label Content="Start Time:" FontWeight="Bold" />
<exceed:DateTimePicker Width="200"
Height="25"
HorizontalAlignment="Left"
Format="Custom"
FormatString="{Binding TimeStampFormat}"
TextAlignment="Center"
Value="{Binding QueryStartTime}" />
</StackPanel>
```
Bindings....
```
#region QueryStartTime
public static readonly DependencyProperty QueryStartTimeProperty = DependencyProperty.Register(
"QueryStartTime", typeof(DateTime), typeof(MainWindowViewModel), new UIPropertyMetadata(new DateTime(DateTime.Now.Ticks, DateTimeKind.Unspecified)));
public DateTime QueryStartTime
{
get
{
return (DateTime)GetValue(QueryStartTimeProperty);
}
set
{
SetValue(QueryStartTimeProperty, (DateTime)value);
}
}
#endregion QueryStartTime
#region TimeStampFormat
public static readonly DependencyProperty TimeStampFormatProperty = DependencyProperty.Register(
"TimeStampFormat", typeof(string), typeof(MainWindowViewModel), new UIPropertyMetadata(DateTimeFormatInfo.CurrentInfo.ShortDatePattern + " " + DateTimeFormatInfo.CurrentInfo.LongTimePattern));
public string TimeStampFormat
{
get
{
return (string)GetValue(TimeStampFormatProperty);
}
set
{
SetValue(TimeStampFormatProperty, (string)value);
}
}
#endregion TimeStampFormat
```
Finally I do molest the local cultural settings a tiny bit... I modify the LongTimePatter to include fff basically just guarantees that milliseconds are displayed, while respecting their other time formatting. I also respect their decimalseperator
```
string seperator = NumberFormatInfo.CurrentInfo.NumberDecimalSeparator;
format = Regex.Replace(format, "(ss|s)", "$1" + seperator + "fff");
```