- Issue created by @sunlix
- π©πͺGermany sunlix Wesel
At
OfficeHoursBaseSlot
, where the validation happens, the information aboutam/pm
is lost.
Because of that the elseif condition is false-valid.$start = OfficeHoursDateHelper::format($input['starthours'], 'H:i', FALSE); // "09:00" $end = OfficeHoursDateHelper::format($input['endhours'], 'H:i', TRUE); // "04:00" elseif ($validate_hours && $end < $start) { // Both Start and End must be entered. That is validated above already. $error_text = 'Closing hours are earlier than Opening hours.'; $erroneous_element = &$element; }
lukasz.tyc β made their first commit to this issueβs fork.
- π³π±Netherlands johnv
I have a problem reproducing this error: it seems I cannot create a HTML5 time input element with [Hours:Minutes am/pm]. Even if fields settings says so, the am/pm part is not shown, and always 24hrs is used.
Using a Windows 11 PC, with Edge, Chrome, Firefox .
What is your environment? - πΊπΈUnited States msupko
Patch #5 did not work for me; it evaluates the previous value of the input rather than the current one, so it only works as long as you are not changing the hours.
The root of the problem seems to be in the new formatters introduced in 1.9; here is a patch that targets this specifically. This resolves the validation issue for me, and may resolve other (as yet unidentified) issues as well.
- Status changed to Fixed
over 1 year ago 10:00pm 4 June 2023 - π³π±Netherlands johnv
Thanks,
should be fixed now.
The last commit contains some housekeeping and better message handling (time format) - Status changed to Needs work
over 1 year ago 4:18pm 6 June 2023 - π³π±Netherlands johnv
Some other check is not always processed correctly.
- Status changed to Fixed
over 1 year ago 4:19pm 6 June 2023 - Status changed to Needs work
over 1 year ago 5:46pm 8 June 2023 - π³π±Netherlands johnv
There is an error in some PHP version "string * int" is not possible.
- Status changed to Fixed
over 1 year ago 5:52pm 8 June 2023 Automatically closed - issue fixed for 2 weeks with no activity.