HTML input type date Tutorial

In this section, we will learn what the <input type = “date”> is and how to use it.

What is input type date in HTML?

The <input type = “date”> element is used to create a field in a document where people can simply select a year and month and a day instead of typing them down.

Note: the value returned from this element is in this format: Year-Month-Day

For example, if someone picked a year 2000 and the month 09, the returned value of this element will be: 2000-09-01

HTML input type date Syntax:

<input type = “date”>

Example: using <input type=”date”> in HTML

See the Pen using <input type="date"> in HTML by Omid Dehghan (@odehghan) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies