
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How to use datetime input type in HTML?
The datetime input type is used in HTML using the <input type="datetime-local">. Using this, allow the users to select date and time. A date time picker popup is visible whenever input field is clicked.
Note − The input type datetime is not supported in Firefox and Internet Explorer. It works on Google Chrome.
Example
You can try to run the following code to learn how to use datetime input type in HTML.
<!DOCTYPE html> <html> <head> <title>HTML input datetime</title> </head> <body> <form action = "" method = "get"> Details:<br><br> Student Name<br><input type="name" name="sname"><br> Exam Date and Time<br><input type="datetime-local" name="datetime"><br> <input type="submit" value="Submit"> </form> </body> </html>
- Related Articles
- HTML DOM Input Datetime type Property
- Input type DateTime Value format with HTML
- How to use range input type in HTML?
- How to use month input type in HTML?
- How to use time input type in HTML?
- How to use email input type in HTML?
- How to use search input type in HTML?
- How to use telephone input type in HTML?
- How to use URL input type in HTML?
- How to use week input type in HTML?
- How to use year input type in HTML?
- How to use input type field with steps in HTML?
- How to use input type field with date field in HTML?
- How to use input type field with the color picker in HTML?
- HTML DOM Input Datetime Object

Advertisements