HTML: input type="month"

The month input collects a year and month, such as a billing period, without a specific day.

What you will learn

Minimal example

<label for="billing-month">Billing month</label>
<input id="billing-month" name="billing-month" type="month" required>

The submitted value is normalized as YYYY-MM. The calendar UI and visible formatting can vary between browsers and operating systems.

Common mistakes