# react-time-selection

> A simple time picker based on react-dates and react-timepicki

Latest version **1.0.2** (published 2019-02-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-time-selection
pnpm add react-time-selection
yarn add react-time-selection
bun add react-time-selection
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-02-07 |
| First published | 2019-01-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 3 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | cjellerHypur |
| Maintainers | cjeller |

## Links

- npm: https://www.npmjs.com/package/react-time-selection
- Repository: https://github.com/cjellerHypur/react-time-selection
- Homepage: https://github.com/cjellerHypur/react-time-selection#readme
- Issues: https://github.com/cjellerHypur/react-time-selection/issues
- npm.io page: https://npm.io/package/react-time-selection

## Dependencies (3)

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) ^0.1.4
- [@fortawesome/fontawesome-svg-core](https://npm.io/package/@fortawesome/fontawesome-svg-core.md) ^1.2.12
- [@fortawesome/free-solid-svg-icons](https://npm.io/package/@fortawesome/free-solid-svg-icons.md) ^5.6.3

## Recent versions

- 1.0.2 (latest) — 2019-02-07
- 1.0.1 — 2019-01-22
- 1.0.0 — 2019-01-21

## README

# react-time-selection

> A simple time picker based on [react-dates](https://github.com/airbnb/react-dates) and [react-timepicki](https://github.com/senthilraj/react-timepicki)

[![NPM](https://img.shields.io/npm/v/react-time-selection.svg)](https://www.npmjs.com/package/react-time-selection) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-airbnb-brightgreen.svg)](https://github.com/airbnb/javascript) [![Build Status](https://travis-ci.org/cjellerHypur/react-time-selection.svg?branch=master)](https://travis-ci.org/cjellerHypur/react-time-selection) [![Coverage Status](https://coveralls.io/repos/github/cjellerHypur/react-time-selection/badge.svg?branch=master)](https://coveralls.io/github/cjellerHypur/react-time-selection?branch=master)

## Install

```bash
npm install --save react-time-selection
```

## Usage

```jsx
import React, { Component } from "react";
import ReactTimeSelection from "react-time-selection";

class Example extends Component {
  render() {
    return <ReactTimeSelection />;
  }
}
```

Or for 24 hour (Military) Time

```jsx
import React, { Component } from "react";
import ReactTimeSelection from "react-time-selection";

class Example extends Component {
  render() {
    return <ReactTimeSelection isMilitaryTime />;
  }
}
```

Controlled Component

```jsx
import React, { Component } from "react";
import TimeSelection from "react-time-selection";

export default class App extends Component {
  state = {
    time: "10 : 00 AM"
  };
  render() {
    const { time } = this.state;
    return (
      <div>
        <TimeSelection
          value={time}
          onTimeChange={time => this.setState({ time })}
        />
      </div>
    );
  }
}
```

## Props

```
isMilitaryTime: PropTypes.bool,
placeholder: PropTypes.string,
value: PropTypes.string,
onTimeChange: PropTypes.func,
onChange: PropTypes.func, // handles change of input element
inputClass: PropTypes.string, // classes to style input element
```

## License

MIT © [cjellerHypur](https://github.com/cjellerHypur)

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