Can I use an HTML input type “date” to collect only a year?

No you can not, but input type number provides exactly the functionality you need for this purpose.

Example:

<input type="number" min="1900" max="2099" step="1" value="2016" />

Leave a Comment