Updated OnEnded logic from TimePickerRenderer

This commit is contained in:
Javier Suárez Ruiz 2017-12-16 13:12:03 +01:00
parent 9ddfc8f93d
commit dd6dff7067
1 changed files with 2 additions and 2 deletions

View File

@ -54,8 +54,8 @@ namespace Ooui.Forms.Renderers
void OnEnded(object sender, EventArgs eventArgs)
{
DateTime.TryParseExact(Control.Value, @"hh\:mm\:ss", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.AssumeUniversal, out var date);
ElementController?.SetValueFromRenderer(TimePicker.TimeProperty, date);
TimeSpan.TryParse(Control.Value, out var time);
ElementController?.SetValueFromRenderer(TimePicker.TimeProperty, time);
ElementController?.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false);
}