input type=date element | input type=date object
Creates a date entry control.
![]() |
DOM Information
Inheritance Hierarchy
Node
Element
HTMLElement
input type=date
Members
The input type=date object has these types of members:
Events
The input type=date object has these events.
| Event | Description |
|---|---|
| oninvalid |
Provides specified alert text if an input element is invalid. |
Standards information
Remarks
Note Returns a date-formatted string containing a numeric representation of the year, month, and day, e.g.
2015-02-15 for the date February 15th, 2015.Examples
This example uses the input type=date element to create an empty date control.
<input type="date" value="" name="userDate">
See also
- Node
- Reference
- input
- validity
- formNoValidate
Show:
