Input Time min attribute
Definition and usage
min
attribute to set or return the value of the min attribute of the time field.
HTML min attribute to specify the minimum value (time) of the time field.
Tip:Please use max and min attributes to create a series of valid values.
Tip:To set or return the value of the max attribute, use max attribute.
See also:
HTML reference manual:HTML <input> min Attribute
Instance
Example 1
Get the shortest time allowed for the time field:
var x = document.getElementById("myTime").min;
Example 2
Change the minimum value:
document.getElementById("myTime").min = "08:00";
Syntax
Return min attribute:
timeObject.min
Set min attribute:
timeObject.min = hh:mm:ss.ms
Attribute value
Value | Description |
---|---|
hh:mm:ss.ms |
The shortest time allowed by the specified time field. Component description:
Examples: "08:39:21.33", "22:36:07" or "15:00". |
Technical details
Return value: | A string value representing the minimum time allowed for the time field. |
---|
Browser Support
The numbers in the table indicate the first browser version to fully support this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |
Note:The <input type="time"> element does not display as any time field in Firefox.