npm.io
1.2.6 • Published 6 years ago

@time-with/time-picker

Licence
MIT
Version
1.2.6
Deps
1
Size
78 kB
Vulns
0
Weekly
0

Timewith Time Picker

Simple React TimePicker

Install

With npm do:

$ npm install @time-with/time-picker
or
$ yarn add @time-with/time-picker

Usage

import TimePicker from '@time-with/time-picker'

<TimePicker
  step={15}
  minTime={new Date()}
  maxTime={new Date()}
  value={new Date()}
  format="HH:mm"
  onChange={this.handleTimeChange}
/>

Parameters

PropName Type Description
step int The step between time options
minTime date The min time
maxTime date The max time
value date The input value
format string How to format the time. Internally it uses the format() of date-fns. Format options here.
onChange func On change handler

License

MIT