HTML input type datetime-local Tutorial

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

What is input type datetime-local in HTML?

The <input type =”datetime-local”> element is used to create a field with controls that users can use to pick a date as well as time.

The return value of this field is in this format: Year-Month-DayTHour:Minutes:Seconds

For example: 2000-01-01T24:00:00

HTML input type datetime-local Syntax:

<input type = “datetime-local”>

Example: using <input type=”datetime-local”> in HTML

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

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies