Catch any exception on formatting (this here was OutOfRange)
This commit is contained in:
parent
264b367516
commit
6e38685531
@ -267,7 +267,7 @@ namespace ENI2
|
||||
#region "BHV Spezial" Datetime Parsing..
|
||||
|
||||
protected void DateTimePicker_PreviewKeyUp(object sender, System.Windows.Input.KeyEventArgs e)
|
||||
{
|
||||
{
|
||||
if ((sender is DateTimePicker thePicker) && rdt.IsMatch(thePicker.Text))
|
||||
{
|
||||
try
|
||||
@ -280,7 +280,7 @@ namespace ENI2
|
||||
int minute = Int32.Parse(timevalText.Substring(10, 2));
|
||||
thePicker.Value = new DateTime(year, month, day, hour, minute, 0);
|
||||
}
|
||||
catch (FormatException) { }
|
||||
catch (Exception) { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user