Input Date type attribute
Example
Return the form element type of the date field:
var x = document.getElementById("myDate").type;
x
The output is:
date
Try it »
Definition and Usage
The type attribute returns the form element type of the date field.
Note: In the example above, Opera, Chrome and Safari return "date", while Internet Explorer and Firefox return "text".
Browser support





All major browsers support the type attribute.
**Note:** Internet Explorer or Firefox browser does not support .
Syntax
inputdateObject
.type
Technical Details
| Return Value: | A string representing the form element type of the date field |
|---|
Input Date Object