Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Edited Issue: DateTime picker crashes with foreign cultures/custom TimeFormat [21479]

$
0
0
The date time picker control crashes when using foreign culture settings in windows e.g. German, Finnish.

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: BoucherS **

Hi,

thanks for info on how to reproduce the crash.
v2.6 will fix this issue.


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>