According to the ISO 8601 , which is an international standard for date and time representation, the two representations are correct: 24:00 and 00:00. But W3C defines that the <input>
of type date
must accept the date in the format specified by RFC 3339 , which contains:
Although ISO 8601 allows the time to be "24", this profile of ISO 8601 only allows values between "00" and "23" for the time, in order to reduce confusion.
It is not only RFC 3339 that discourages the "24:00" form - style manuals and military regulations in some countries also discourage use. The manual for the US Navy and the US Marine Corps formally specifies as valid values from 0001 to 2359. ( Font )
Although it is possible to make a component that accepts the value 24:00, I do not see much advantage in working to format the date in an unordered format.