<form name="myForm" action="https://www.PuStudy.Com/resources/html-forms-action.html"> <input type="datetime" name="myDateTimeField"> <button>Submit</button> </form>
The above example demonstrates usage of the
<input> element with the
type attribute set to
datetime value represents a control for setting the element's value to a string representing a specific global date and time. This is a date and time (year, month, day, hour, minute, second, fraction of a second) with the time zone set to UTC.
Note: At the time of writing, the
datetime value had limited browser support.
datetime value was not introduced in HTML5, but at the time of writing, it has been introduced in the HTML 5.1 draft, as well as the WHATWG HTML Living Standard.