]>
Commit | Line | Data |
---|---|---|
78637ac0 M |
1 | TimePicker |
2 | ========== | |
3 | ||
4 | React TimePicker | |
5 | ||
6 | install | |
7 | ------- | |
8 | ||
9 | ``` | |
10 | npm install rc-time-picker | |
11 | ``` | |
12 | ||
13 | Usage | |
14 | ----- | |
15 | ||
16 | ``` | |
17 | import TimePicker from 'rc-time-picker'; | |
18 | import React from 'react'; | |
19 | import ReactDOM from 'react-dom'; | |
20 | ReactDOM.render(<TimePicker />, container); | |
21 | ``` | |
22 | ||
23 | API | |
24 | --- | |
25 | ||
4acbf95c | 26 | ### TimePicker |
78637ac0 M |
27 | |
28 | | Name | Type | Default | Description | | |
29 | |---------------|----------------------------|-----------------------------------------------|-----------------------------------------------| | |
30 | | prefixCls | String | | prefixCls of this component | | |
31 | | locale | Object | import from 'rc-time-picker/lib/locale/en_US' | | | |
4acbf95c M |
32 | | disabled | Boolean | false | whether picker is disabled | |
33 | | open | Boolean | false | current open state of picker. controlled prop | | |
34 | | value | GregorianCalendar | null | current value like input's value | | |
78637ac0 M |
35 | | placeholder | String | '' | time input's placeholder | |
36 | | formatter | GregorianCalendarFormatter | HH:mm:ss or HH:mm or mm:ss | | | |
37 | | hourOptions | Array<String> | hour options | | | |
38 | | minuteOptions | Array<String> | minute options | | | |
39 | | secondOptions | Array<String> | second options | | | |
4acbf95c M |
40 | | onChange | Function | null | called when select a different value | |
41 | | onOpen | Function | null | called when open picker | | |
42 | | onClose | Function | null | called when close picker | | |
78637ac0 M |
43 | |
44 | License | |
45 | ------- | |
46 | ||
47 | rc-time-picker is released under the MIT license. |