asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Elements > INPUT type=month Element

<input type=month> Element


Creates a control for selecting a month and year value.HTML 5

HTML Syntax

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

Remarks

The <input type=month> element is used to create a control for selecting or entering a month and a year.

The control renders in supporting browsers as a month-year picker, or as numeric wheels for month and year.

The appearance of the month-year picker interface varies, based on the browser and operating system.

<input type=month> 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 resulting value includes the year and month.

The submitted value is normalized to the format yyyy-mm.

Attributes

The <input_month> element supports the following attributes, in addition to global attributes and attributes common to all HTML input elements.

Example

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

<input type=month>

External References

See Also

INPUT   INPUT type=date   INPUT type=datetime-local   INPUT type=week


Need a break ?
Suggested Reading

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

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