Skip to content

Commit

Permalink
GFG-159 DateTimePicker: Changing the hours will automatically update …
Browse files Browse the repository at this point in the history
  • Loading branch information
ceo1647 committed Apr 6, 2021
1 parent 91347d0 commit ac7bb56
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Orc.Controls/Controls/DateTimePicker/DateTimePicker.cs
Expand Up @@ -1219,6 +1219,11 @@ private void OnHourValueChanged(object sender, EventArgs e)
return;
}

if (AmPm == "PM")
{
hour += 12;
}

var currentValue = value ?? _todayValue;
SetCurrentValue(ValueProperty, new DateTime(currentValue.Year, currentValue.Month, currentValue.Day, hour.Value, currentValue.Minute, currentValue.Second));
}
Expand Down

0 comments on commit ac7bb56

Please sign in to comment.