Date and time input

There are types for the input element for selecting a time or part of a time. Appearance is dependent from browser.

code result
<input type="date" 
id="sDate" name="sDate"
value="2019-07-22"
min="2019-01-01" max="2019-12-31">
Date selection
<input type="datetime-local" 
id="sLocalDate"name="sLocalDate" 
value="2019-06-12T19:30"
min="2019-06-07T00:00" 
max="2019-06-14T00:00">
Local date selection
<input type="month" 
id="sMonth" name="sMonth"
min="2019-03" value="2019-05">
Month selection
<input type="week" 
id="sWeek" name="sWeek"
min="2019-W18" max="2019-W26"
value="2019-W01">
Week selection
<input type="time" id="sTime" name="sTime"
min="09:00" max="21:00"
required>
Time selection

attributes

atribute description
id, name Name of element. The name attribute is obsolete, the id should be used or both.
value Value for submission. It is a string in corresponding format. For example for date it is "YYYY-MM-DD".
min, max Define range of possible value.
step The stepping interval, when clicking up and down spinner buttons.