1.2.12 • Published 2 years ago
react-timeit v1.2.12
react-timeit
A time picker for your React app.
Install
npm install --save react-timeit
# or
yarn add react-timeit
Basic Usage
import React from "react";
import Timeit from "react-timeit";
function App() {
return <Timeit />;
}
Props
onChange
...
function App() {
const [time, setTime] = useState();
return <Timeit onChange={(value) => setTime(value)} />
}
defaultValue
...
function App() {
return <Timeit defaultValue='06:10' />
}
minuteExclude | hourExclude
...
// show just 05,10,20,30,40,50,00
function App() {
return <Timeit minuteExclude={[
1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22,
23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59
]} />
}
// use lodash and show just 05,10,20,30,40,50,00
function App() {
return <Timeit minuteExclude={_.range(0, 60, 1).filter(o=> !_.range(0, 60, 10).includes(o))} />
}
notShowExclude
...
function App() {
return <Timeit notShowExclude minuteExclude={[
1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22,
23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59
]} />
}
1.2.12
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.1.9
2 years ago
1.1.8
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.12
2 years ago
1.1.11
2 years ago
1.1.10
2 years ago
1.0.9
3 years ago
1.0.11
3 years ago
1.0.10
3 years ago
1.0.12
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago