2 ms·
For <input type="date">, it's a https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string https://html.spec.whatwg.org/multipage/common
by bzbarsky 9y ago
For <input type="date">, it's a https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string https://html.spec.whatwg.org/multipage/common-microsyntaxes.... (see <https://html.spec.whatwg.org/multipage/input.html#date-state-(type=date)> https://html.spec.whatwg.org/multipage/input.html#date-state... though you have to know how the inputs section of the spec works in general to see that it enforces the "valid date string" constraint). To translate from spec to something readable, it's YYYY-MM-DD, with nothing else.
For <input type="time"> it's <https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-time-string> https://html.spec.whatwg.org/multipage/common-microsyntaxes..... Again, to translate to something readable, it's HH:MM[:SS] where the :SS part is optional if seconds is 0, and all numbers are 0-based (so 0 <= HH <= 23, 0 <= MM,SS <= 59).
For <input type="datetime-local"> it's https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-normalised-local-date-and-time-string https://html.spec.whatwg.org/multipage/common-microsyntaxes.... which is yyyy-mm-ddThh:mm[:ss] without any timezone information, afaict, and with [:ss] guaranteed to be left out if 0.