1.2.17 • Published 2 years ago

react-octo-time v1.2.17

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

react-timeit

A time picker for your React app.

npm.io

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.17

2 years ago

1.2.16

2 years ago

1.2.15

2 years ago

1.2.14

2 years ago

1.2.13

2 years ago

1.2.12

2 years ago