How to use week input type in HTML?

HTMLWeb DevelopmentFront End Technology

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.

Example

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

   <body>
      <form action = "" method = "get">
         Details:<br><br>
         Student Name<br><input type = "name" name = "sname"><br>
         Training week<br><input type = "week" name = "week"><br>
         <input type = "submit" value = "Submit">
      </form>
   </body>
   
</html>
raja
Published on 23-Jan-2018 11:01:54
Advertisements