field-time
日付と時刻 datetime.js が拡張する四つのフィールド。いずれも下にネイティブの入力要素を残すので、スクリプトのない読者には壊れたものではなく素のコントロールが届きます。
同じ包みを、ネイティブの時刻入力に。こちらの拡張が読むのはカレンダーではなく時計です。
どの例も実際に動きますが、リンクはどこにも移動しません。 HTML にはコピーできるマークアップがあります。
拡張された入力欄:「7時半」や「正午」と入力できます
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="time_live" >開場</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":"前|まえ","am":"午前|am","at":"に","day":"日","hour":"時間|時","in":"後|あと","last":"先|昨|去","midnight":"深夜|真夜中","minute":"分","month":"か月|ヶ月|カ月|月","next":"来|次|翌","noon":"正午|昼","pm":"午後|pm","today":"今日|きょう|本日","tomorrow":"明日|あした|あす","week":"週間|週","yesterday":"昨日|きのう"}" data-rst-date-set ="設定" data-rst-date-hint ="入力例: {example}" data-rst-date-pick ="カレンダーを開く" data-rst-date-pick-time ="時計を開く" data-rst-date-results ="候補 {n} 件" data-rst-date-result-one ="候補 1 件" data-rst-date-quick-today ="今日" data-rst-date-quick-tomorrow ="明日" data-rst-date-quick-next-week ="1週間後" data-rst-date-quick-plus-1h ="1時間後" data-rst-date-quick-plus-2h ="2時間後" data-rst-date-quick-end-of-day ="その日の終わり" data-rst-date-quick-next-day ="翌日の同じ時刻" >
<small rst-field-hint id ="time_live-hint" >現地時間。</small >
</div >
必須、エラーつき
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="time_error" >開場 <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":"前|まえ","am":"午前|am","at":"に","day":"日","hour":"時間|時","in":"後|あと","last":"先|昨|去","midnight":"深夜|真夜中","minute":"分","month":"か月|ヶ月|カ月|月","next":"来|次|翌","noon":"正午|昼","pm":"午後|pm","today":"今日|きょう|本日","tomorrow":"明日|あした|あす","week":"週間|週","yesterday":"昨日|きのう"}" data-rst-date-set ="設定" data-rst-date-hint ="入力例: {example}" data-rst-date-pick ="カレンダーを開く" data-rst-date-pick-time ="時計を開く" data-rst-date-results ="候補 {n} 件" data-rst-date-result-one ="候補 1 件" data-rst-date-quick-today ="今日" data-rst-date-quick-tomorrow ="明日" data-rst-date-quick-next-week ="1週間後" data-rst-date-quick-plus-1h ="1時間後" data-rst-date-quick-plus-2h ="2時間後" data-rst-date-quick-end-of-day ="その日の終わり" data-rst-date-quick-next-day ="翌日の同じ時刻" >
<small rst-field-error id ="time_error-error" >サウンドチェックより後の時刻を選んでください。</small >
</div >
範囲つき
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="time_bounded" >9時から11時の間</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":"前|まえ","am":"午前|am","at":"に","day":"日","hour":"時間|時","in":"後|あと","last":"先|昨|去","midnight":"深夜|真夜中","minute":"分","month":"か月|ヶ月|カ月|月","next":"来|次|翌","noon":"正午|昼","pm":"午後|pm","today":"今日|きょう|本日","tomorrow":"明日|あした|あす","week":"週間|週","yesterday":"昨日|きのう"}" data-rst-date-set ="設定" data-rst-date-hint ="入力例: {example}" data-rst-date-pick ="カレンダーを開く" data-rst-date-pick-time ="時計を開く" data-rst-date-results ="候補 {n} 件" data-rst-date-result-one ="候補 1 件" data-rst-date-quick-today ="今日" data-rst-date-quick-tomorrow ="明日" data-rst-date-quick-next-week ="1週間後" data-rst-date-quick-plus-1h ="1時間後" data-rst-date-quick-plus-2h ="2時間後" data-rst-date-quick-end-of-day ="その日の終わり" data-rst-date-quick-next-day ="翌日の同じ時刻" >
</div >
Plain:素のネイティブ入力
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="time_plain" >開場</label >
<input rst-input id ="time_plain" name ="time_plain" type ="time" value ="19:30" >
</div >