'00' minutes are considered as empty in OfficeHoursDateList::validateDateList

Created on 21 June 2024, 7 days ago

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

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code - widget

Created by

πŸ‡ͺπŸ‡ΈSpain plopesc Valladolid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024