diff --git a/UI/Controls/DatePickerBar/DatePickerBar.cs b/UI/Controls/DatePickerBar/DatePickerBar.cs index b2e2b6fb98d1a5dbbdb756f33be42b57e5064869..5639fea8263909973152e9978359f1ce4d6e3f73 100644 --- a/UI/Controls/DatePickerBar/DatePickerBar.cs +++ b/UI/Controls/DatePickerBar/DatePickerBar.cs @@ -48,7 +48,11 @@ namespace UI.Controls.DatePickerBar var control = d as DatePickerBar; if (e.NewValue != e.OldValue) { - control.ScrollToActive(DateTime.Parse(e.NewValue.ToString())); + //DateTime newDateTime = DateTime.Now; + + DateTime.TryParse(e.NewValue.ToString(), out DateTime newDateTime); + + control.ScrollToActive(newDateTime); control.UpdateDateString(); } }