1.6.1 • Published 6 years ago
time-input v1.6.1
time-input
A keyboard friendly react component for capturing time
features
- small UI surface area (just a form input)
- keyboard friendly (can type times, use up and down keys to go forwards and backwards in time, can tab between time groups)
- simple api (infers most options from value, e.g. 24hr time or 12hr, whether to display seconds and milliseconds)
- easy going UX: ignores invalid input and simply skips over separator if omitted
- no dependencies
- 95% test coverage
installation
npm install time-input
usage
var ReactDom = require('ReactDom')
var TimeInput = require('time-input')
function render (value) {
ReactDom.render((
<TimeInput value={value} onChange={render}/>
), document.body)
}
render()
valid formats
/*
* '12:00'
* '12:00 AM'
* '12:00:00'
* '12:00:00:000 AM'
*/
run tests
npm test
demo
1.6.1
6 years ago
1.6.0
6 years ago
1.5.1
7 years ago
1.5.0
7 years ago
1.4.0
7 years ago
1.3.4
7 years ago
1.3.3
7 years ago
1.3.2
7 years ago
1.3.1
8 years ago
1.3.0
8 years ago
1.2.8
8 years ago
1.2.7
8 years ago
1.2.6
8 years ago
1.2.5
8 years ago
1.2.4
8 years ago
1.2.3
8 years ago
1.2.2
8 years ago
1.2.1
8 years ago
1.2.0
8 years ago
1.1.0
8 years ago
1.0.0
8 years ago