I need to create a “from ... to” time selection and create 2 TimePicker components for it. Since the database behind already exists over the years and uses the 24 hour format, in my code I install
tpOpenFrom.setIs24HourView(true);
tpOpenTo.setIs24HourView(true);
Now my problem is that it seems that “24:00” cannot be selected as the value “to:”, since after “23” (: 00) the component switches “back” to “00”, (: 00), which makes it impossible to find out if the user forgot to make the actual choice, for example, if “09:00” was entered as “from” and “00:00” as “before” time. Or, if the choice was made “00:00” to “00:00”: did the user forget to enter something or does he intend to define “open around the clock”?
In 24 hour mode, TimePicker should really allow you to enter 24:00. The 24-hour clock system in ISO 8601 defines midnight as a special case, which can be called both “00:00” and “24:00”, so TimePicker should set the clock to 24 and automatically block minutes to 00.
Does anyone have an idea how to achieve this using TimePicker?
source
share