HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Input DatetimeLocal Object : Change the legal number intervals for seconds in a local date field
The step property sets or returns the value of the step attribute of a local datetime field.
The step attribute specifies the legal number intervals for seconds or milliseconds in a local datetime field (does not apply for days, months, years, hours or minutes).
Example: if step="2", legal numbers could be 0, 2, 4, etc.
Property | |||||
---|---|---|---|---|---|
step | Yes | 10.0 | Yes | Yes | Yes |
Return the step property:
Set the step property:
Value | Description |
---|---|
number |
Specifies the legal number intervals in the local datetime field.
For seconds:
For milliseconds:
|
Return Value: | A Number, representing the legal number intervals for seconds or milliseconds |
---|
Change the legal number intervals for milliseconds in a local date field:
document.getElementById("myLocalDate").step = ".020";
Get the legal number intervals for seconds in a local date field:
var x = document.getElementById("myLocalDate").step;
HTML reference: HTML <input> step Attribute
❮ Input DatetimeLocal Object