# @cig/timepicker

> React Time Picker Control

Latest version **0.0.5** (published 2020-09-15) · ISC license · 0 weekly downloads

## Install

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

## 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.0.5 |
| Published | 2020-09-15 |
| First published | 2020-09-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | z |
| Maintainers | ancf, marken, loseyear |
| Keywords | react, time, picker, mobile |

## Links

- npm: https://www.npmjs.com/package/@cig/timepicker
- Repository: https://github.com/cig-data/x
- Homepage: https://github.com/cig-data/x/tree/master/packages/timePicker#readme
- Issues: https://github.com/cig-data/x/issues
- npm.io page: https://npm.io/package/@cig/timepicker

## Dependencies (4)

- [react](https://npm.io/package/react.md) ^16.13.1
- [react-dom](https://npm.io/package/react-dom.md) ^16.13.1
- [@cig/select](https://npm.io/package/@cig/select.md) ^0.0.7
- [styled-components](https://npm.io/package/styled-components.md) ^5.1.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.5 (latest) — 2020-09-15
- 0.0.4 — 2020-09-15
- 0.0.3 — 2020-09-15
- 0.0.2 — 2020-09-08
- 0.0.1 — 2020-09-08

## README

# @cig/select
The Time Picker control for React.

## Installation and usage
The easiest way to use @cig/timepicker is to install it from npm and build it into your app with Webpack.

```js
npm i -S @cig/timepicker
```

Then use it in your App:

```js
import React, {
  useState,
  useEffect,
} from 'react'
import Select from '@cig/timepicker'

import {
  Box,
} from './style'

export default () => {
  const [show, setShow] = useState(false)
  const [value, setValue] = useState('2020-10-01')
  const title = '新易互动...'
  const confirmValue = '确定'
  const minDate = '2010/01/01'
  const maxDate = '2020/12/31'

  useEffect(() => console.log(value), [value])

  return (
    <Box>
      <div
        onClick={() => setShow(!show)}
        role="button"
        onKeyUp={() => {}}
        tabIndex={0}
      >
        {show ? 'Time Pikcer Hide' : 'Time Picker Show'}
      </div>
      {
        show
          ? (
            <Select
              title={title}
              value={value}
              format={format}
              minDate={minDate}
              maxDate={maxDate}
              show={v => setShow(v)}
              confirmValue={confirmValue}
              confirm={v => setValue(v)}
            />
          ) : null
      }
    </Box>
  )
}
```

## Props
| 名称 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| title | String | N | 请选择 | 标题 |
| value | Array | Y | - | 默认选项 |
| minDate | String | Y | - | 格式 |
| maxDate | String | Y | - | 格式 |
| show | Function | Y | - | 是否显示 |
| confirmValue | String | N | 确定 | 确定按钮文案 |
| confirm | Function | Y | - | 确定按钮回调 |

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