245
HTML Date
The date is the value of the type attribute of an <input> element. It creates a calendar that allows a user to choose the date. The resulting value includes the day, month, and year.
Syntax
Example 1: The following example describes how to use the date in <input> tag:
Output:
Example 2: The following example uses the JavaScript code for displaying the date which is entered in form.
Output:
Browser Support
Element | Chrome | IE | Firefox | Opera | Safari |
<type=”Date”> | Yes | Yes | Yes | Yes | Yes |
Next TopicHTML Form Action