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

Commented Unassigned: DateTimePicker crash if value is smaller than MinValue [21563]

$
0
0
DateTimePicker crash if value is smaller than MinValue

How to reproduce crash in LiveExplorer:

Select current date in DateTimePicker. Set minimum value to tomorrow.
Comments: ** Comment from web user: hanns_echtleder **

I can understand that this raises an exception. But how can I handle it?

In my application I have a view model that has DateTime values bound to Value, Minimum and Maximum of the DateTimePicker. Now when data is loaded where the selected value isn't in min-max range (for whatever reason) the whole application crashes due to the exception thrown in OnApplyTemplate of the DateTimePicker.

I have found no way to handle that error yet (except of course check dates in the view model, which would require me to change a lot of existing code instead of having one generic error handling in the view level), and I think the control should be a bit more robust.


Viewing all articles
Browse latest Browse all 4964

Trending Articles



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