Skip to content

A jquery plugin to transform a input field into (+/-) days/hours/minutes/seconds selector.

Notifications You must be signed in to change notification settings

midweste/TimingField

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TimingField

A jquery plugin to transform a input field into (+/-) hours/minutes/seconds selector. Field value output as (+/-)SECONDS or (+/-)HH:MM:SS.

Requirements

  • jQuery
  • Twitter Bootstrap

Sample

TimingField sample image

With useTimestamp: true the text input value is output as seconds

  • <input value="86400" ... >

With useTimestamp: false the text input value is output as HH:MM:SS

  • <input value="24:00:00" ... >

Configuration

This is the current available configuration :

$.fn.timingfield.defaults = {
    maxHour: 23,
    minutesInterval: 5,
    width: '100%',
    signText: '+/-',
    daysText: 'D',
    hoursText: 'H',
    minutesText: 'M',
    secondsText: 'S',
    useTimestamp: true,
    signVisible: true,
    daysVisible: true,
    hoursVisible: true,
    minutesVisible: true,
    secondsVisible: true,
    defaultValue: 300
};

Usage

...
$('.timestamp').timingfield();
...

About

A jquery plugin to transform a input field into (+/-) days/hours/minutes/seconds selector.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 84.2%
  • CSS 9.7%
  • HTML 6.1%