# react-table-time-picker

> Time picker represented in table form powered by React

Latest version **0.4.0** (published 2020-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-table-time-picker
pnpm add react-table-time-picker
yarn add react-table-time-picker
bun add react-table-time-picker
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2020-09-09 |
| First published | 2020-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 41.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | honmameiko |
| Maintainers | honmameiko |
| Keywords | react, time, timepicker, range, rangepicker |

## Links

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

## Dependencies (3)

- [uuid](https://npm.io/package/uuid.md) ^8.3.0
- [moment](https://npm.io/package/moment.md) ^2.27.0
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.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

- 0.4.0 (latest) — 2020-09-09
- 0.3.0 — 2020-09-02
- 0.2.3 — 2020-08-31
- 0.2.2 — 2020-08-31
- 0.2.1 — 2020-08-31
- 0.2.0 — 2020-08-31
- 0.1.1 — 2020-08-31
- 0.1.0 — 2020-08-31
- 0.0.5 — 2020-08-31
- 0.0.4 — 2020-08-30
- 0.0.3 — 2020-08-30
- 0.0.2 — 2020-08-30
- 0.0.1 — 2020-08-28

## README

# react-table-time-picker

![](https://i.loli.net/2020/08/27/p2PgHQXD5a9JoTm.jpg)

# Description

Time picker represented in table form

# Dependencies

- React.JS
- Moment.JS

# Installation

``` bash
npm run install --save react-table-time-picker
```

# Usage

``` jsx
import React, { useState } from 'react';
import { render } from 'react-dom';
import moment from 'moment';
import TimePicker from 'react-table-time-picker';

function App() {
  return (
    <div>
      <TimePicker
        attachElement={(
          <input />
        )}
      />
    </div>
  );
}
render(<App />, document.getElementById('root'));
```

# API

| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
|  zIndex | Number | 1 | css z-index |
| maxWidth | Number | undefined | css max-width
| maxHeight | Number | undefined | css max-height
| position | ['top','right','bottom','left'] | medium | position of the time picker relative to its attach element
| defaultValue | [`moment`,`moment`] | [moment(), moment()] | moment instance of begin time and end time
| onValueChange | Function | () => {} | call back when both start time and end time are selected,two-tuple `[moment,moment]` which represents start and end time will be passed as arguments
| size | ['small','medium','big'] | medium | size of the time picker
| width | Number | according to size | if you are not satisfied with the preset width according to size props,custom it with this prop |
| height | Number | according to size | if you are not satisfied with the preset height according to size props,custom it with this prop |
| fontSize | Number | according to size | if you are not satisfied with the preset fontSize according to size props,custom it with this prop |
| attachElement | HTMLElement | - | the attachment for the time picker
| originColor | CSS Color | #66ccff | color of the table cell
| includedColor | CSS Color | rgba(102, 204, 255, 0.5) | color of the table cell when included between the begin time and end time
| selectedColor | CSS Color | #458bad | color of the table cell when selected as begin time or end time
| confirmModal | Boolean | true | whether to pop up a confirm modal when begin time and end time are both selected |
| className | String | empty string | className of the time picker wrapper element, note that this prop is designed to help detecting the propagation of events produced inside the time picker |
| hourStep | Number | 1 | hour interval option |
| minuteStep | Number | 1 |minute interval option |

# New Features
- Interval options are now supported
- Tooltips will now give a explicit hint in cross day cases
- Tooltip hiding option supported

![demo](https://i.loli.net/2020/09/09/6vNs4bpEClGzuyJ.png)

![demo](https://i.loli.net/2020/09/09/1Vza9gmQ2iDtpPU.png)

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