# @beisen-phoenix/time-picker

> 输入或选择时间的控件。

Latest version **3.3.55** (published 2019-11-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install @beisen-phoenix/time-picker
pnpm add @beisen-phoenix/time-picker
yarn add @beisen-phoenix/time-picker
bun add @beisen-phoenix/time-picker
```

## 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 | 3.3.55 |
| Published | 2019-11-25 |
| First published | 2019-03-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 135.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | beisencorp |

## Links

- npm: https://www.npmjs.com/package/@beisen-phoenix/time-picker
- npm.io page: https://npm.io/package/@beisen-phoenix/time-picker

## Dependencies (6)

- [raf](https://npm.io/package/raf.md) ^3.4.1
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.8
- [rc-trigger](https://npm.io/package/rc-trigger.md) 2.6.2
- [@beisen-phoenix/icon](https://npm.io/package/@beisen-phoenix/icon.md) ^3.2.54
- [@beisen-phoenix/style-token](https://npm.io/package/@beisen-phoenix/style-token.md) ^3.3.55

## Recent versions

- 3.3.55 (latest) — 2019-11-25
- 3.2.44-rc.1 (rc) — 2019-10-24
- 3.3.54 — 2019-11-25
- 3.3.53 — 2019-11-25
- 3.3.52 — 2019-11-24
- 3.3.51 — 2019-11-23
- 3.3.50 — 2019-11-22
- 3.3.49 — 2019-11-22
- 3.3.48 — 2019-11-22
- 3.3.46 — 2019-11-22
- 3.3.45 — 2019-11-21
- 3.3.43 — 2019-11-21
- 3.3.42 — 2019-11-21
- 3.3.41-beta.1 — 2019-11-21
- 3.3.41 — 2019-11-21
- … 358 more at https://npm.io/package/@beisen-phoenix/time-picker/versions

## README

输入或选择时间的控件。

## 何时使用

当用户需要输入一个时间，可以点击标准输入框，弹出时间面板进行选择。

## API

| 参数               | 说明                                                   | 类型                                             | 默认值       |
| ------------------ | ------------------------------------------------------ | ------------------------------------------------ | ------------ |
| lang               | 面板语言                                               | `zhCN/zhTW/enUS`                                 | 'zhCN'       |
| addon              | 选择框底部显示自定义的内容                             | function                                         | 无           |
| allowEmpty         | 是否展示清除按钮                                       | boolean                                          | true         |
| showSecond         | 是否展示秒选项                                         | boolean                                          | true         |
| use12Hours         | 使用 12 小时制，为 true 时 `format` 默认为 `h:mm:ss a` | boolean                                          | false        |
| value              | 当前时间                                               | [moment](http://momentjs.com/)                   | 无           |
| disabledHours      | 禁止选择部分小时选项                                   | function()                                       | 无           |
| disabledMinutes    | 禁止选择部分分钟选项                                   | function(selectedHour)                           | 无           |
| disabledSeconds    | 禁止选择部分秒选项                                     | function(selectedHour, selectedMinute)           | 无           |
| format             | 展示的时间格式                                         | string                                           | "HH:mm:ss"   |
| hideDisabldOptions | 隐藏禁止选择的选项                                     | boolean                                          | false        |
| placeholder        | 没有值的时候显示的内容                                 | string                                           | "请输入时间" |
| hourStep           | 小时选项间隔                                           | number                                           | 1（1-23）    |
| minuteStep         | 分钟选项间隔                                           | number                                           | 1 （1-60）   |
| secondStep         | 秒选项间隔                                             | number                                           | 1 （1-60）   |
| onChange           | 时间发生变化的回调                                     | function(time: moment, timeString: string): void | 无           |
| onSelect           | 时/分/秒中的某一列的数值被选中后执行的函数,只有在最后一列会被调用                 | function(): void |            |
| onAmPmChange       | 上午下午发生变化的回调                                 | function(ampm): void                             | 无           |
| onClear            | 点击清除按钮时的回调                                   | function(): void                                 | 无           |
| disabledTime       | 禁止选择部分小时/分钟/秒的选项                           | () => {disabledHours: Function,disabledMinutes: Function,disabledSeconds: Function}

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