]> git.immae.eu Git - github/fretlink/time-picker.git/blame - README.md
lint
[github/fretlink/time-picker.git] / README.md
CommitLineData
e75ed0c6 1# TimePicker
78637ac0
M
2
3React TimePicker
4
e9060dda 5[![NPM version][npm-image]][npm-url]
6[![build status][travis-image]][travis-url]
7[![Test coverage][coveralls-image]][coveralls-url]
8[![gemnasium deps][gemnasium-image]][gemnasium-url]
9[![node version][node-image]][node-url]
10[![npm download][download-image]][download-url]
11
12[npm-image]: http://img.shields.io/npm/v/rc-time-picker.svg?style=flat-square
13[npm-url]: http://npmjs.org/package/rc-time-picker
14[travis-image]: https://img.shields.io/travis/react-component/time-picker.svg?style=flat-square
15[travis-url]: https://travis-ci.org/react-component/time-picker
16[coveralls-image]: https://img.shields.io/coveralls/react-component/time-picker.svg?style=flat-square
17[coveralls-url]: https://coveralls.io/r/react-component/time-picker?branch=master
18[gemnasium-image]: http://img.shields.io/gemnasium/react-component/time-picker.svg?style=flat-square
19[gemnasium-url]: https://gemnasium.com/react-component/time-picker
20[node-image]: https://img.shields.io/badge/node.js-%3E=_4.0.0-green.svg?style=flat-square
21[node-url]: http://nodejs.org/download/
22[download-image]: https://img.shields.io/npm/dm/rc-time-picker.svg?style=flat-square
23[download-url]: https://npmjs.org/package/rc-time-picker
24
25example
26--------
27
28http://react-component.github.io/time-picker/
29
78637ac0
M
30install
31-------
32
33```
34npm install rc-time-picker
35```
36
37Usage
38-----
39
40```
41import TimePicker from 'rc-time-picker';
42import React from 'react';
43import ReactDOM from 'react-dom';
44ReactDOM.render(<TimePicker />, container);
45```
46
47API
48---
49
4acbf95c 50### TimePicker
78637ac0 51
e75ed0c6
M
52| Name | Type | Default | Description |
53|----------------|----------------------------|-----------------------------------------------|--------------------------------------------------------------------------------------------|
54| prefixCls | String | | prefixCls of this component |
55| locale | Object | import from 'rc-time-picker/lib/locale/en_US' | |
56| disabled | Boolean | false | whether picker is disabled |
57| open | Boolean | false | current open state of picker. controlled prop |
9f9f39e4 58| defaultValue | GregorianCalendar | null | default initial value |
8133e8cf 59| value | GregorianCalendar | null | current value |
60| gregorianCalendarLocale | GregorianCalendar locale object | null | if value and defaultValue not set, you should set this to your locale |
e75ed0c6 61| placeholder | String | '' | time input's placeholder |
8133e8cf 62| showHour | Boolean | whether show hour | |
63| showSecond | Boolean | whether show second | |
64| formatter | String|GregorianCalendarFormatter | | |
e9060dda 65| hourOptions | Array<Number> | hour options | |
66| minuteOptions | Array<Number> | minute options | |
67| secondOptions | Array<Number> | second options | |
e75ed0c6 68| onChange | Function | null | called when select a different value |
e75ed0c6
M
69| placement | String | bottomLeft | one of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'] |
70| transitionName | String | '' | |
78637ac0
M
71
72License
73-------
74
75rc-time-picker is released under the MIT license.