Input Date typeProperty
Example
Return the type of form element with the date field:
var x = document.getElementById("myDate").type;
xThe output is:date
Try it Yourself »
Definition and Usage
The type property returns the type of form element of the date field.
Note:In the above examples, Opera, Chrome and Safari return "date", Internet Explorer and Firefox return "text".
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the type property.
Note:Internet Explorer or Firefox browser does not support the <input type="date"> element.
Syntax
inputdateObject.type
Technical Details
| Return Value: | String, representing the type of form element of the date field |
|---|
Input Date Object Other Extensions