Closed (fixed)
Project:
Office Hours
Version:
8.x-1.9
Component:
Code - widget
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 May 2023 at 08:35 UTC
Updated:
22 Jun 2023 at 17:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sunlixAt
OfficeHoursBaseSlot, where the validation happens, the information aboutam/pmis lost.Because of that the elseif condition is false-valid.
Comment #4
luk.tc commentedQUick fix for validate hours
Comment #5
luk.tc commentedComment #6
johnvI 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?
Comment #7
msupko commentedPatch #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.
Comment #11
johnvThanks,
should be fixed now.
The last commit contains some housekeeping and better message handling (time format)
Comment #12
johnvSome other check is not always processed correctly.
Comment #14
johnvComment #15
johnvThere is an error in some PHP version "string * int" is not possible.
Comment #17
johnv