Related Articles

Related Articles

HTML | <input type=”datetime-local”>
  • Last Updated : 29 May, 2019

The HTML <input type=”datetime-local”> is used to define a date and time control. The value must include the year, month, day and time.

Syntax:

<input type="datetime-local">

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html> 
<html
  
<head
    <title>
        HTML input type datetime-local
    </title>
      
    <style
        h1 { 
            color: green; 
        
          
        body { 
            text-align: center; 
        
    </style
</head
  
<body
  
    <h1>GeeksforGeeks</h1
      
    <h2> HTML <input type = "datetime-local"></h2
      
    <br
      
    Date Of Birth: 
    <input type="datetime-local" id="Test_DatetimeLocal"
</body
  
</html>

chevron_right


Output:

Supported Browsers: The browsers supported by <input type=”datetime-local”> are listed below:

  • Google Chrome 20.0
  • Internet Explorer 13.0
  • Opera 10.1

full-stack-img

My Personal Notes arrow_drop_up
Recommended Articles
Page :