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"
<section rst-box><form rst-form method="post" action="#"><div rst-field>
<label rst-field-label for="field-date_live">Publish on</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">The day it goes live.</small>
</div></form></section>
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
<section rst-box><form rst-form method="post" action="#"><div rst-field>
<label rst-field-label for="field-date_error">Publish on <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">Pick a date after today.</small>
</div></form></section>
Có giới hạn
<section rst-box><form rst-form method="post" action="#"><div rst-field>
<label rst-field-label for="field-date_bounded">Within this year</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></form></section>
Plain — ô nhập gốc để trơn
<section rst-box><form rst-form method="post" action="#"><div rst-field>
<label rst-field-label for="field-date_plain">Publish on</label>
<input rst-input id="field-date_plain" name="field-date_plain" type="date" value="2026-09-04">
</div></form></section>
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.