Matt Ross

timepicker.js

Allow your users to easily select a time from a drop down menu.

timepicker.js is a free, customisable, light-weight and dependency free widget for input boxes written in JavaScript.

example.com/index.html

index.html
<!DOCTYPE html>
<html>
<head>
<script src="timepicker.js" defer></script>
</head>
<body>
<label>Time:
<input type="text" data-type="timepicker" value="5:00pm" />
</label>
</body>
</html>

Using timepicker.js on your site

  1. Download timepicker.js and upload it to your server in a publicly accessible directory

  2. Add your <script src="/path/to/timepicker.js" defer></script>, preferably in your page’s <head>

  3. Add the <input type="text" data-type="timepicker"> element on your page with the rest of your form elements.

  4. Optional: Set your Configuration and Styling options.

Fork me on GitHub