HTML <input> min Attribute

❮ HTML <input> tag

Example

<form action="action.php">
<label for="date">Enter a date between (2020-01-01 - 2021-01-01):</label>
<input type="date" id="date" name="date" min="2020-01-01" max="2021-01-01"><br><br>

<label for="quantity">Quantity (between 1 and 10):</label>
<input type="number" id="quantity" name="quantity" min="0" max="10"><br><br>

<input type="submit">
</form>

Meaning

The min attribute should be set to a numeric value that is the low range allowed in the form control.

The maxmax attribute sets the high range.

The min attributes valid for <input> type number, range, date, datetime-local, month, time and week.


Standard Syntax

HTML: <input min="number|date">

XHTML: <input min="number|date"/>



Browser Support




Status







Attribute Values

Value Description
number Specifies the mainimum value allowed.
date Specifies the mainimum date allowed.
❮ HTML <input> tag