min and max by input type
What format do min and max use for each input type?
min and max use the same machine format as the input's value, not the format the browser shows, so a date limit is always yyyy-mm-dd whatever the visitor's locale.
| Input type | min/max format | Example | Out of range |
|---|---|---|---|
| number | A number, decimals allowed | min="1" max="10" | Blocks the submit (rangeUnderflow / rangeOverflow) |
| range | A number (defaults: 0 and 100) | min="0" max="50" | Can't happen: the slider clamps to the limit |
| date | yyyy-mm-dd | min="2026-11-03" | Blocks the submit |
| time | hh:mm or hh:mm:ss (24-hour) | min="09:00" max="17:00" | Blocks the submit |
| datetime-local | yyyy-mm-ddThh:mm | min="2026-11-03T09:00" | Blocks the submit |
| month | yyyy-mm | max="2026-12" | Blocks the submit |
| week | yyyy-Www | min="2026-W45" | Blocks the submit |
Sources: MDN: min attribute · MDN: max attribute




