← Back to release summary

Reversed range for <input type=time>

Category
DOM
Type
New or changed feature
Status
Enabled by default (Chrome 83)
Intent stage
Evaluate readiness to ship

Summary

According to the HTML spec, <input type=time>, which allows users to input time in hours, minutes, and seconds, should support reversed ranges because it has a defined maximum of "23:59:59". A reversed range is when the input has a min and max attribute where the max is less than the min, and in this state, the input should allow values which are less than the min or greater than the max, but not in between them. This has been in the spec for many years but has not been implemented until now.

Motivation

Without this feature, web developers cannot express time inputs which should cross midnight. See this discussion: https://www.w3.org/Bugs/Public/show_bug.cgi?id=7688

Standards & signals

Docs: See summary above

Samples: https://input-reversed-range.glitch.me/

Explainers: See summary above

View on chromestatus.com