asp.net.ph

Skip Navigation Links

INPUT type=date Element

HTML Input Elements


Creates a date picker control.HTML 2, 3.2, 4, 4.01, 5

HTML Syntax

NOTE: Only the <input> start tag must be present. The element has no end tag.

Remarks

The <input type=date> element is used to create a control for entering a date ( year, month, and day, with no time ).

The control renders as a date picker or numeric wheels for year, month, day when active in supporting browsers.

<input type=date> may be specified with min and max attributes to restrict the dates that can be chosen by the user.

The control may also be specified with a value attribute, to set a default value for the input.

The appearance of the date picker UI varies, based on the browser and operating system.

The resulting value includes the year, month, and day, but not the time. The value is normalized to the format yyyy-mm-dd.

Attributes

The <input_date> element has no attribute of its own, but supports global attributes common to all HTML elements.

Example

The following example shows how a simple <input type=date> control renders on a web page.

<input type=date>
See Also

INPUT   INPUT type=datetime-local



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note