field-time
Date and time The four fields datetime.js enhances, each keeping its native input underneath, so a reader with no script gets the plain control and not a broken one.
The same envelope around a native time input. The enhancement reads a clock rather than a calendar.
Each example is live, but its links go nowhere. HTML shows the markup to copy.
Enhanced input: type "half seven", or "noon"
Put this inside <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="time_live" >Doors open</label >
<input rst-input id ="time_live" name ="time_live" type ="time" value ="19:30" aria-describedby ="time_live-hint" data-rst-time data-rst-date-words ="{"ago":"ago","am":"am|a.m.","at":"at","day":"day|days","hour":"hour|hours|h","in":"in","last":"last","midnight":"midnight","minute":"minute|minutes|min|mins|m","month":"month|months","next":"next","noon":"noon|midday","pm":"pm|p.m.","today":"today","tomorrow":"tomorrow","week":"week|weeks","yesterday":"yesterday"}" data-rst-date-set ="Set" data-rst-date-hint ="Try: {example}" data-rst-date-pick ="Open the calendar" data-rst-date-pick-time ="Open the clock" data-rst-date-results ="{n} suggestions" data-rst-date-result-one ="1 suggestion" data-rst-date-quick-today ="Today" data-rst-date-quick-tomorrow ="Tomorrow" data-rst-date-quick-next-week ="In a week" data-rst-date-quick-plus-1h ="An hour later" data-rst-date-quick-plus-2h ="Two hours later" data-rst-date-quick-end-of-day ="End of that day" data-rst-date-quick-next-day ="Same time next day" >
<small rst-field-hint id ="time_live-hint" >Local time.</small >
</div >
Required, with an error
Put this inside <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="time_error" >Doors open <span rst-field-required aria-hidden ="true" >*</span ></label >
<input rst-input id ="time_error" name ="time_error" type ="time" required aria-invalid ="true" aria-describedby ="time_error-error" data-rst-time data-rst-date-words ="{"ago":"ago","am":"am|a.m.","at":"at","day":"day|days","hour":"hour|hours|h","in":"in","last":"last","midnight":"midnight","minute":"minute|minutes|min|mins|m","month":"month|months","next":"next","noon":"noon|midday","pm":"pm|p.m.","today":"today","tomorrow":"tomorrow","week":"week|weeks","yesterday":"yesterday"}" data-rst-date-set ="Set" data-rst-date-hint ="Try: {example}" data-rst-date-pick ="Open the calendar" data-rst-date-pick-time ="Open the clock" data-rst-date-results ="{n} suggestions" data-rst-date-result-one ="1 suggestion" data-rst-date-quick-today ="Today" data-rst-date-quick-tomorrow ="Tomorrow" data-rst-date-quick-next-week ="In a week" data-rst-date-quick-plus-1h ="An hour later" data-rst-date-quick-plus-2h ="Two hours later" data-rst-date-quick-end-of-day ="End of that day" data-rst-date-quick-next-day ="Same time next day" >
<small rst-field-error id ="time_error-error" >Pick a time after the sound check.</small >
</div >
Bounded
Put this inside <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="time_bounded" >Between nine and eleven</label >
<input rst-input id ="time_bounded" name ="time_bounded" type ="time" value ="19:30" min ="09:00" max ="23:00" data-rst-time data-rst-date-words ="{"ago":"ago","am":"am|a.m.","at":"at","day":"day|days","hour":"hour|hours|h","in":"in","last":"last","midnight":"midnight","minute":"minute|minutes|min|mins|m","month":"month|months","next":"next","noon":"noon|midday","pm":"pm|p.m.","today":"today","tomorrow":"tomorrow","week":"week|weeks","yesterday":"yesterday"}" data-rst-date-set ="Set" data-rst-date-hint ="Try: {example}" data-rst-date-pick ="Open the calendar" data-rst-date-pick-time ="Open the clock" data-rst-date-results ="{n} suggestions" data-rst-date-result-one ="1 suggestion" data-rst-date-quick-today ="Today" data-rst-date-quick-tomorrow ="Tomorrow" data-rst-date-quick-next-week ="In a week" data-rst-date-quick-plus-1h ="An hour later" data-rst-date-quick-plus-2h ="Two hours later" data-rst-date-quick-end-of-day ="End of that day" data-rst-date-quick-next-day ="Same time next day" >
</div >
Plain: the bare native input
Put this inside <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="time_plain" >Doors open</label >
<input rst-input id ="time_plain" name ="time_plain" type ="time" value ="19:30" >
</div >