# @madappgang/time-input

> time input for react applications

Latest version **1.0.8** (published 2019-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @madappgang/time-input
pnpm add @madappgang/time-input
yarn add @madappgang/time-input
bun add @madappgang/time-input
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2019-01-10 |
| First published | 2019-01-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 72.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Denys Provodnikov [MadAppGang] |
| Maintainers | dprovodnikov, msalabutin |
| Keywords | react, time, input |

## Links

- npm: https://www.npmjs.com/package/@madappgang/time-input
- Repository: https://github.com/dprovodnikov/react-time-input
- Homepage: https://github.com/dprovodnikov/react-time-input#readme
- Issues: https://github.com/dprovodnikov/react-time-input/issues
- npm.io page: https://npm.io/package/@madappgang/time-input

## Dependencies (2)

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

## 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

- 1.0.8 (latest) — 2019-01-10

## README

# React time input

Smart time input for react applications

![Example](https://i.ibb.co/kmDcn6n/ezgif-com-video-to-gif.gif)

## Installation

```bash
$ npm install @madappgang/time-input
```

## Usage example

You provide your own input representation using render props

```javascript
import TimeInput from '@madappgang/time-input';

...

this.state = {
  time: { hours: 0, minutes: 0, prefix: 'am' }, // i/o time format
};

return (
  <TimeInput
    time={this.state.time}
    onChange={time => this.setState({ time })} // { hours, minutes, prefix }
  >
    {({ value, onChange, onKeyDown, onBlur }) => (
      <input
        value={value}
        onChange={onChange}
        onKeyDown={onKeyDown}
        onBlur={onBlur}
      />
    )}
  </TimeInput>
);
```

## Available props

| Prop | Type | Description |
|:----:|:----:|:-----------:|
| value | String | The intermediate input value |
| invalid | Bool | The input value validity indicator |
| onChange | Func | Input value change event handler |
| onKeyDown | Func | Input value keyDown event handler |
| onBlur | Func | Input value blur event handler |


### License
MIT

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