]>
Commit | Line | Data |
---|---|---|
e75ed0c6 | 1 | # TimePicker |
78637ac0 M |
2 | |
3 | React TimePicker | |
4 | ||
5 | install | |
6 | ------- | |
7 | ||
8 | ``` | |
9 | npm install rc-time-picker | |
10 | ``` | |
11 | ||
12 | Usage | |
13 | ----- | |
14 | ||
15 | ``` | |
16 | import TimePicker from 'rc-time-picker'; | |
17 | import React from 'react'; | |
18 | import ReactDOM from 'react-dom'; | |
19 | ReactDOM.render(<TimePicker />, container); | |
20 | ``` | |
21 | ||
22 | API | |
23 | --- | |
24 | ||
4acbf95c | 25 | ### TimePicker |
78637ac0 | 26 | |
e75ed0c6 M |
27 | | Name | Type | Default | Description | |
28 | |----------------|----------------------------|-----------------------------------------------|--------------------------------------------------------------------------------------------| | |
29 | | prefixCls | String | | prefixCls of this component | | |
30 | | locale | Object | import from 'rc-time-picker/lib/locale/en_US' | | | |
31 | | disabled | Boolean | false | whether picker is disabled | | |
32 | | open | Boolean | false | current open state of picker. controlled prop | | |
9f9f39e4 | 33 | | defaultValue | GregorianCalendar | null | default initial value | |
8133e8cf | 34 | | value | GregorianCalendar | null | current value | |
35 | | gregorianCalendarLocale | GregorianCalendar locale object | null | if value and defaultValue not set, you should set this to your locale | | |
e75ed0c6 | 36 | | placeholder | String | '' | time input's placeholder | |
8133e8cf | 37 | | showHour | Boolean | whether show hour | | |
38 | | showSecond | Boolean | whether show second | | | |
39 | | formatter | String|GregorianCalendarFormatter | | | | |
e75ed0c6 M |
40 | | hourOptions | Array<String> | hour options | | |
41 | | minuteOptions | Array<String> | minute options | | | |
42 | | secondOptions | Array<String> | second options | | | |
43 | | onChange | Function | null | called when select a different value | | |
e75ed0c6 M |
44 | | placement | String | bottomLeft | one of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'] | |
45 | | transitionName | String | '' | | | |
78637ac0 M |
46 | |
47 | License | |
48 | ------- | |
49 | ||
50 | rc-time-picker is released under the MIT license. |