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

CommentFileSizeAuthor
office-hours-bug.mp42.67 MBplopesc
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

plopesc created an issue. See original summary.

plopesc’s picture