HTML <input> Tag with 'type=time'
<form name="myForm" action="/resources/html-forms-action.cfm">
<input type="time" name="myTimeField">
<button>Submit</button>
</form>
The above example demonstrates usage of the <input>
element with the type
attribute set to time
(i.e. type="time"
).
The time
value represents a control for setting the element's value to a string representing a specific time. This is a time (hour, minute, seconds, fractional seconds) with no time zone.
You can also use the datetime
, datetime-local
, week
, month
, and date
values when working with dates and times.