field-date
ネイティブの日付入力に、datetime.js が有効にする自然文コンボボックスを重ねたものです(呼び出し側が Plain を渡した場合を除く)。「明日」と入力してみてください。
拡張された入力欄:「明日」や「3週間後」と入力できます
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="field-date_live" >公開日</label >
<input rst-input id ="field-date_live" name ="field-date_live" type ="date" value ="2026-09-04" aria-describedby ="field-date_live-hint" data-rst-date 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-calendar ="カレンダー" data-rst-date-prev-month ="前の月" data-rst-date-next-month ="次の月" 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 ="field-date_live-hint" >公開される日。</small >
</div >
これは <section rst-box><form rst-form> の中に置きます。
{{ template "field-date" dict
"Name" "field-date_live"
"Label" "公開日"
"Value" "2026-09-04"
"Hint" "公開される日。" }}
解釈できる語は data-rst-date-words に載って出ていきます。このページのカタログから引かれたものなので、フィールドはページと同じ言語を読み取ります。
必須、エラーつき
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="field-date_error" >公開日 <span rst-field-required aria-hidden ="true" >*</span ></label >
<input rst-input id ="field-date_error" name ="field-date_error" type ="date" required aria-invalid ="true" aria-describedby ="field-date_error-error" data-rst-date 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-calendar ="カレンダー" data-rst-date-prev-month ="前の月" data-rst-date-next-month ="次の月" 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 ="field-date_error-error" >今日より後の日付を選んでください。</small >
</div >
これは <section rst-box><form rst-form> の中に置きます。
{{ template "field-date" dict
"Name" "field-date_error"
"Label" "公開日"
"Required" true
"Error" "今日より後の日付を選んでください。" }}
範囲つき
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="field-date_bounded" >今年中</label >
<input rst-input id ="field-date_bounded" name ="field-date_bounded" type ="date" value ="2026-09-04" min ="2026-01-01" max ="2026-12-31" data-rst-date 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-calendar ="カレンダー" data-rst-date-prev-month ="前の月" data-rst-date-next-month ="次の月" 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 >
これは <section rst-box><form rst-form> の中に置きます。
{{ template "field-date" dict
"Name" "field-date_bounded"
"Label" "今年中"
"Value" "2026-09-04"
"Min" "2026-01-01"
"Max" "2026-12-31" }}
Plain:素のネイティブ入力
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="field-date_plain" >公開日</label >
<input rst-input id ="field-date_plain" name ="field-date_plain" type ="date" value ="2026-09-04" >
</div >
これは <section rst-box><form rst-form> の中に置きます。
{{ template "field-date" dict
"Name" "field-date_plain"
"Label" "公開日"
"Value" "2026-09-04"
"Plain" true }}
拡張用の属性がまったくないので、datetime.js には見つけるものがありません。ネイティブのピッカーはそれでも開きます。