# @compeon/timepicker

> Simple timepicker using react

Latest version **0.0.8** (published 2021-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @compeon/timepicker
pnpm add @compeon/timepicker
yarn add @compeon/timepicker
bun add @compeon/timepicker
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2021-09-21 |
| First published | 2018-06-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 44.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | finnr, dlandry, lgreiving, janb, compeonnpm, bahrens, florian-compeon, dominikfischer86, jbelovs, stphnrdmr, splittydev |
| Keywords | timepicker, react, react-timepicker |

## Links

- npm: https://www.npmjs.com/package/@compeon/timepicker
- npm.io page: https://npm.io/package/@compeon/timepicker

## Dependencies (1)

- [prop-types](https://npm.io/package/prop-types.md) ^15.6.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.8 (latest) — 2021-09-21
- 0.0.7 — 2021-08-31
- 0.0.6 — 2021-08-24
- 0.0.5 — 2021-06-15
- 0.0.4 — 2021-06-11
- 0.0.3 — 2020-03-16
- 0.0.2 — 2019-07-15
- 0.0.1 — 2018-06-19

## README

# COMPEON Timepicker

Simple time picker component built with react and styled-components.

![Screenshot](screenshot.png)

## Installation

```bash
yarn add @compeon/timepicker
```

Install `styled-components`

```bash
yarn add styled-components
```

## Usage

```jsx
import CompeonTimepicker from '@compeon/timepicker'

class Timepicker extends React.Component {
  state = {
    value: '17:30'
  }

  handleChange = value => this.setState({ value })

  render () {
    return (
	    <CompeonTimepicker onChange={this.handleChange} value={this.state.value}>
	      <input />
 	    </CompeonTimepicker>
 	  )
  }
}
```

## Props

prop | description | type | default | example
------------ | ------------- | ------------- | ------------- | -------------
className | The class name to be applied to the outermost div of the time picker |string ||
dialogClassName | The class name to be applied to the dialog of the time picker | string ||
from | Lower time boundary for the time range to pick from. If this prop is set, `to` has to be set as well |string|| `"10:00"`
inputClassName | The class name to be applied to the child of the time picker |string||
minutesPerStep | The amount of minutes to add or subtract when the user changes the minutes via the arrow buttons or the mouse wheel | int | `15` |
onBlur | Function that is called when the time picker is closed | function ||
onChange | Function that is called when the value of the time picker changes | function ||
onFocus | Function that is called when the time picker is focussed | function ||
to | Upper time boundary for the time range to pick from. If this prop is set, `from` has to be set as well | string || `"17:30"`
value | The value to currently display. In case the initial value is outside of the specified time range, the time picker will immediately call `onChange` with a value that is in range | string | `"00:00"` | `"22:45"`

## Author

[Gerrit Seger](https://github.com/GerritSe) (gseger@compeon.de)

[COMPEON](https://compeon.de/)

## License

MIT

---
_Source: https://npm.io/package/@compeon/timepicker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
