How to use week input type in HTML?

The week input type is used in HTML using the <input type="week">. Using this, allow users to select a week and year.

A date picker popup is visible whenever you will give a user input to the week input type.

Note − The input type week is not supported in Firefox and Internet Explorer. It works on Google Chrome.

weel Input

You can try to run the following code to learn how to use week input type in HTML. It will show both week and year.


Live Demo
<!DOCTYPE html>
      <title>HTML input week</title>

      <form action = "" method = "get">
         Student Name<br><input type = "name" name = "sname"><br>
         Training week<br><input type = "week" name = "week"><br>
         <input type = "submit" value = "Submit">
Sai Subramanyam
Sai Subramanyam

Passionate, Curious and Enthusiastic.