HTML and CSS Reference
In-Depth Information
Next, the
time
input:
<input type="time" value="10:30">
Again, styling is determined by the
browser.
If you want the user's local time, use
datetime-local
:
<input type="datetime-local"
value="2010-05-31T21:00">
This looks the same as the
datetime
control
but without the
UTC
annotation. In this
example, you can see how to specify a
default value for the
datetime
and
datetime-local
input types:
yyyy-mm-ddThh:mm
.
As well as full dates, you can have months
or weeks:
<input type="month"
value="2010-05">
<input type="week">
In Opera, these look identical to the full
date picker, but some browsers may
choose to implement a custom
UI
.