Problem/Motivation
Using the datelist widget, when hour or AM/PM selectors are empty, the validation triggers and error indicating that filed must be set.
However, when leaving empty both hour and AM/PM and setting minutes to '00', validation thinks that all the fields are empty and passs validation.
This leads to a secondary effect, that is that missing closing hours are saved.
See recording: https://www.drupal.org/files/issues/2024-06-21/office-hours-bug.mp4
Steps to reproduce
Check the linked recording.
Proposed resolution
Consider '00' as a non-empty value tro ensure that validation works as expected.
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
plopescDuplicated of #3455363: TypeError: Unsupported operand types: string + int in OfficeHoursDateHelper::format() with empty pm hour field