“The Hours (value X) end date cannot be before the start date” for ranges crossing midnight

Created on 8 October 2024, 3 months ago

Problem/Motivation

When I set an hourly range that goes through midnight, such as 20:00 to 00:00, the form does not allow this range through and displays an error:
“The Hours (value X) end date cannot be before the start date”

Steps to reproduce

  1. I use the Time Range field in the form on my site.
  2. I set the start time to 20:00 and the end time to 00:00 (24:00).
  3. when I save the form, I get an error:
    - ‘The Hours (value X) end date cannot be before the start date’.

Proposed resolution

The time 00:00 should be treated as the end of the day and the module should support ranges that pass through midnight (e.g. 20:00 to 00:00 or 22:00 to 06:00).

🐛 Bug report
Status

Active

Version

9.0

Component

Code

Created by

🇵🇱Poland bronismateusz

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

Comments & Activities

Production build 0.71.5 2024