field-date
Một ô nhập ngày gốc, kèm hộp kết hợp hiểu ngôn ngữ tự nhiên mà datetime.js bật lên, trừ khi nơi gọi truyền Plain. Hãy gõ "ngày mai" vào đó.
Ô nhập nâng cao: gõ "ngày mai" hoặc "sau 3 tuần"
Đặt đoạn này bên trong <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="field-date_live" >Ngày xuất bản</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":"trước","am":"sáng|am","at":"lúc|vào","day":"ngày","hour":"giờ|tiếng|h","in":"nữa|sau","last":"trước|qua|rồi","midnight":"nửa đêm","minute":"phút|p","month":"tháng","next":"tới|tiếp|sau","noon":"giữa trưa|trưa","pm":"chiều|tối|pm","today":"hôm nay|nay","tomorrow":"ngày mai|mai","week":"tuần","yesterday":"hôm qua"}" data-rst-date-set ="Đặt" data-rst-date-hint ="Thử: {example}" data-rst-date-pick ="Mở lịch" data-rst-date-calendar ="Lịch" data-rst-date-prev-month ="Tháng trước" data-rst-date-next-month ="Tháng sau" data-rst-date-results ="{n} gợi ý" data-rst-date-result-one ="1 gợi ý" data-rst-date-quick-today ="Hôm nay" data-rst-date-quick-tomorrow ="Ngày mai" data-rst-date-quick-next-week ="Một tuần nữa" data-rst-date-quick-plus-1h ="Một giờ sau" data-rst-date-quick-plus-2h ="Hai giờ sau" data-rst-date-quick-end-of-day ="Cuối ngày hôm đó" data-rst-date-quick-next-day ="Cùng giờ ngày hôm sau" >
<small rst-field-hint id ="field-date_live-hint" >Ngày bắt đầu hiển thị.</small >
</div >
Đặt đoạn này bên trong <section rst-box><form rst-form>.
{{ template "field-date" dict
"Name" "field-date_live"
"Label" "Ngày xuất bản"
"Value" "2026-09-04"
"Hint" "Ngày bắt đầu hiển thị." }}
Những từ nó phân tích được gửi ra qua data-rst-date-words, tra từ danh mục của trang này: ô nhập phân tích đúng ngôn ngữ mà trang đang dùng.
Bắt buộc, kèm lỗi
Đặt đoạn này bên trong <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="field-date_error" >Ngày xuất bản <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":"trước","am":"sáng|am","at":"lúc|vào","day":"ngày","hour":"giờ|tiếng|h","in":"nữa|sau","last":"trước|qua|rồi","midnight":"nửa đêm","minute":"phút|p","month":"tháng","next":"tới|tiếp|sau","noon":"giữa trưa|trưa","pm":"chiều|tối|pm","today":"hôm nay|nay","tomorrow":"ngày mai|mai","week":"tuần","yesterday":"hôm qua"}" data-rst-date-set ="Đặt" data-rst-date-hint ="Thử: {example}" data-rst-date-pick ="Mở lịch" data-rst-date-calendar ="Lịch" data-rst-date-prev-month ="Tháng trước" data-rst-date-next-month ="Tháng sau" data-rst-date-results ="{n} gợi ý" data-rst-date-result-one ="1 gợi ý" data-rst-date-quick-today ="Hôm nay" data-rst-date-quick-tomorrow ="Ngày mai" data-rst-date-quick-next-week ="Một tuần nữa" data-rst-date-quick-plus-1h ="Một giờ sau" data-rst-date-quick-plus-2h ="Hai giờ sau" data-rst-date-quick-end-of-day ="Cuối ngày hôm đó" data-rst-date-quick-next-day ="Cùng giờ ngày hôm sau" >
<small rst-field-error id ="field-date_error-error" >Chọn một ngày sau hôm nay.</small >
</div >
Đặt đoạn này bên trong <section rst-box><form rst-form>.
{{ template "field-date" dict
"Name" "field-date_error"
"Label" "Ngày xuất bản"
"Required" true
"Error" "Chọn một ngày sau hôm nay." }}
Có giới hạn
Đặt đoạn này bên trong <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="field-date_bounded" >Trong năm nay</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":"trước","am":"sáng|am","at":"lúc|vào","day":"ngày","hour":"giờ|tiếng|h","in":"nữa|sau","last":"trước|qua|rồi","midnight":"nửa đêm","minute":"phút|p","month":"tháng","next":"tới|tiếp|sau","noon":"giữa trưa|trưa","pm":"chiều|tối|pm","today":"hôm nay|nay","tomorrow":"ngày mai|mai","week":"tuần","yesterday":"hôm qua"}" data-rst-date-set ="Đặt" data-rst-date-hint ="Thử: {example}" data-rst-date-pick ="Mở lịch" data-rst-date-calendar ="Lịch" data-rst-date-prev-month ="Tháng trước" data-rst-date-next-month ="Tháng sau" data-rst-date-results ="{n} gợi ý" data-rst-date-result-one ="1 gợi ý" data-rst-date-quick-today ="Hôm nay" data-rst-date-quick-tomorrow ="Ngày mai" data-rst-date-quick-next-week ="Một tuần nữa" data-rst-date-quick-plus-1h ="Một giờ sau" data-rst-date-quick-plus-2h ="Hai giờ sau" data-rst-date-quick-end-of-day ="Cuối ngày hôm đó" data-rst-date-quick-next-day ="Cùng giờ ngày hôm sau" >
</div >
Đặt đoạn này bên trong <section rst-box><form rst-form>.
{{ template "field-date" dict
"Name" "field-date_bounded"
"Label" "Trong năm nay"
"Value" "2026-09-04"
"Min" "2026-01-01"
"Max" "2026-12-31" }}
Plain: ô nhập gốc để trơn
Đặt đoạn này bên trong <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="field-date_plain" >Ngày xuất bản</label >
<input rst-input id ="field-date_plain" name ="field-date_plain" type ="date" value ="2026-09-04" >
</div >
Đặt đoạn này bên trong <section rst-box><form rst-form>.
{{ template "field-date" dict
"Name" "field-date_plain"
"Label" "Ngày xuất bản"
"Value" "2026-09-04"
"Plain" true }}
Không có thuộc tính tăng cường nào cả, nên datetime.js chẳng tìm thấy gì. Bộ chọn gốc vẫn mở được.