devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6c93461324c7687aa81eec6b58635e0ea3a786c3

commit 6c93461324c7687aa81eec6b58635e0ea3a786c3
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Thu Jul 25 14:45:48 2019 -0400

    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
---
 src/lib/elementary/efl_ui_timepicker.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/efl_ui_timepicker.c 
b/src/lib/elementary/efl_ui_timepicker.c
index 938c22c846..59ef13d3f1 100644
--- a/src/lib/elementary/efl_ui_timepicker.c
+++ b/src/lib/elementary/efl_ui_timepicker.c
@@ -59,7 +59,7 @@ _field_value_update(Eo *obj)
 
    if (!pd->is_24hour)
      {
-        if (pd->cur_time[TIMEPICKER_HOUR] >= 12)
+        if (pd->cur_time[TIMEPICKER_HOUR] > 12)
           {
              //TODO: gets text from strftime.
              efl_text_set(pd->ampm, "PM");
@@ -68,7 +68,7 @@ _field_value_update(Eo *obj)
         else
           {
              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]);
           }
      }
 

-- 


Reply via email to