efl_ui/timepicker: fix range clamping on 12 hour timepickers

Summary: this errors all the time otherwise

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9396
This commit is contained in:
Mike Blumenkrantz 2019-07-25 14:45:48 -04:00 committed by Christopher Michael
parent e3557ec944
commit 6c93461324
1 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ _field_value_update(Eo *obj)
if (!pd->is_24hour) if (!pd->is_24hour)
{ {
if (pd->cur_time[TIMEPICKER_HOUR] >= 12) if (pd->cur_time[TIMEPICKER_HOUR] > 12)
{ {
//TODO: gets text from strftime. //TODO: gets text from strftime.
efl_text_set(pd->ampm, "PM"); efl_text_set(pd->ampm, "PM");
@ -68,7 +68,7 @@ _field_value_update(Eo *obj)
else else
{ {
efl_text_set(pd->ampm, "AM"); efl_text_set(pd->ampm, "AM");
efl_ui_range_value_set(pd->hour, pd->cur_time[TIMEPICKER_HOUR] + 12); efl_ui_range_value_set(pd->hour, pd->cur_time[TIMEPICKER_HOUR]);
} }
} }