Open In App
Related Articles

HTML | <input type=”date”>

Improve Article
Improve
Save Article
Save
Like Article
Like

The HTML <input type=”date”> is used to define a date picker or control field. The value will be the year, month and day. 
Syntax: 
 

<input type="date"> 

Example: 
 

html




<!DOCTYPE html>
<html>
 
<head>
    <title>HTML Input type = "Date" </title>
    <style>
        h1 {
            color: green;
        }
         
        h2 {
            font-family: Impact;
        }
         
        body {
            text-align: center;
        }
    </style>
</head>
 
<body>
 
    <h1>GeeksforGeeks</h1>
    <h2>HTML <input type="date"></h2>
 
    <input type="date"
           id="test"
           value="2019-07-02T25:32Z">
 
</body>
 
</html>


Output: 
 

Supported Browsers: 
 

  • Google Chrome 20.0 and above
  • Firefox 57.0 and above
  • Edge 12.0 and above
  • Opera 11 and above
  • Apple Safari 14.1 and above

 

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 22 Jul, 2022
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials