Skip to content
Snippets Groups Projects
Commit 9b80ca4a authored by noberumotto's avatar noberumotto
Browse files

修复某些情况下选择日期报错的问题

parent 4674ab8a
Branches
No related merge requests found
......@@ -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();
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment