react-timeit
TypeScript icon, indicating that this package has built-in type declarations

1.2.12 • Public • Published

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
        ]} />
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.12593latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.12593
1.1.1239
1.1.118
1.1.100
1.1.90
1.1.80
1.1.70
1.1.61
1.1.50
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.120
1.0.110
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.11
1.0.00

Package Sidebar

Install

npm i react-timeit

Weekly Downloads

393

Version

1.2.12

License

MIT

Unpacked Size

1.35 MB

Total Files

13

Last publish

Collaborators

  • amirhbeigi