A jquery plugin to transform a input field into (+/-) hours/minutes/seconds selector. Field value output as (+/-)SECONDS or (+/-)HH:MM:SS.
- jQuery
- Twitter Bootstrap
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" ... >
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
};
...
$('.timestamp').timingfield();
...