Input DatetimeLocal type property
Example
Returns the form element type of the local datetime field:
var x = document.getElementById("myLocalDate").type;
x The output result is:
datetime-local
Try it »
Definition and Usage
The type property returns the form type of the local datetime field.
Note: In the example above, Internet Explorer and Firefox return "text" instead of "datetime-local".
Browser support





All major browsers support the type attribute.
**Note:** Internet Explorer or Firefox browser does not support .
Syntax
datetimelocalObject
.type
Technical Details
| Return Value: | String representing the form element type of the local datetime field |
|---|
Input DatetimeLocal Object