THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <input type="month">

❮ HTML <input> type attribute

Example

Define a month and year control (no time zone):

Birthday (month and year): <input type="month" name="bdaymonth">
Try it Yourself »

Definition and Usage

The <input type="month"> defines a month and year control.

The format is "YYYY-MM".


Browser Support

The numbers in the table specify the first browser version that fully supports the element.

Attribute
type="month" 25.0 12.0 Not supported Not supported 10.1

Syntax

<input type="month">

❮ HTML <input> type attribute