Horje
How to create HTML Input Type Week

The <input type="week"> allows the user to select a week and year.

Depending on browser support, a date picker can show up in the input field.


How is to look HTML Input Type Week

index.html
Example: HTML
 <form>
  <label for="week">Select a week:</label>
  <input type="week" id="week" name="week">
</form> 

Output should be:

How is to look HTML Input Type Week

HTML Input Type Week

Display a Week Input Control The input type="week" allows the user to select a week and year. If the browser supports it, a date picker pops up when entering the input field. Note: type="week" is not supported in Firefox, Safari or Internet Explorer 11.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>Display a Week Input Control</h1>

<p>The <strong>input type="week"</strong> allows the user to select a week and year.</p>

<p>If the browser supports it, a date picker pops up when entering the input field.</p>

<form action="/action_page.php">
  <label for="week">Select a week:</label>
  <input type="week" id="week" name="week">
  <input type="submit" value="Submit">
</form>

<p><strong>Note:</strong> type="week" is not supported in Firefox, Safari or Internet Explorer 11.</p>

</body>
</html>

Output should be:

HTML Input Type Week





Category:
Web Tutorial
Sub Category:
HTML Input Types
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference