Basic Time Input Plugin For jQuery - Fugit

Basic Time Input Plugin For jQuery - Fugit

Fugit is a small jQuery plugin that converts the standard input field into a user-friendly time selector. Your users are able to quickly select and change hours/minutes values with keyboard.

1. Install & Download the Fugit via NPM:

# Yarn
$ yarn add jquery-fugit
$ npm install jquery-fugit --save

2. Import the jQuery Fugit into your web page.

// ES 6
import Fugit from 'jquery-fugit';
// CommonJS:
const Fugit = require('jquery-fugit');
<!-- Browser -->
<link rel="stylesheet" href="dist/jquery.fugit.css">
<script src="" 
<script src="dist/jquery.fugit.js"></script>

3. Create a normal input field for the time selector.

<input id="fugit">

4. Call the function on the input field to initialize the time selector.

$(function() {

5. The plugin provides an event which will be fired on each change.

$(function() {
  $('#fugit').fugit().on('change.fugit', function(e) {
    console.log('value changed to', $(e.currentTarget).val());

This awesome jQuery plugin is developed by timgthomas. For more Advanced Usages, please check the demo page or visit the official website.

  • Publication date: 23.01.2018
  • Source