Horje
How to create HTML Input Type Time

The <input type="time"> allows the user to select a time (no time zone).

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


How is to look HTML Input Type Time

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

Full Code Example of HTML Input Type Time

Show a Time Input Control The input type="time" allows the user to select a time (no time zone): If the browser supports it, a time picker pops up when entering the input field. Note: type="time" is not supported in Internet Explorer 11.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>Show a Time Input Control</h1>

<p>The <strong>input type="time"</strong> allows the user to select a time (no time zone):</p>

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

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

<p><strong>Note:</strong> type="time" is not supported in Internet Explorer 11.</p>

</body>
</html>

Output should be:

Full Code Example of HTML Input Type Time





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


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