Kiểu <input type="week"> cho phép chọn tuần và năm. Hiển thị bộ chọn tuần khi focus.
Lưu ý: Không hỗ trợ trên Firefox và Internet Explorer. Hoạt động trên Chrome, Edge, Safari, Opera.
Ví dụ
<!DOCTYPE html> <html> <head> <title>HTML input week</title> </head> <body> <form action="" method="get"> Thông tin:<br><br> Tên học sinh<br><input type="text" name="sname"><br> Tuần đào tạo<br><input type="week" name="week"><br> <input type="submit" value="Gửi"> </form> </body> </html>
Giá trị gửi đi: Định dạng YYYY-Www (ví dụ: 2024-W12 là tuần 12 năm 2024). Theo tiêu chuẩn ISO 8601.