diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | src/TimePicker.jsx | 5 |
2 files changed, 5 insertions, 1 deletions
@@ -69,6 +69,7 @@ API | |||
69 | | onChange | Function | null | called when select a different value | | 69 | | onChange | Function | null | called when select a different value | |
70 | | placement | String | bottomLeft | one of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'] | | 70 | | placement | String | bottomLeft | one of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'] | |
71 | | transitionName | String | '' | | | 71 | | transitionName | String | '' | | |
72 | | autoComplete | String | 'yes' | one of ['yes', 'no'] | | ||
72 | 73 | ||
73 | 74 | ||
74 | ## Test Case | 75 | ## Test Case |
diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx index 58f6ea1..da0c57b 100644 --- a/src/TimePicker.jsx +++ b/src/TimePicker.jsx | |||
@@ -39,6 +39,7 @@ const Picker = React.createClass({ | |||
39 | onChange: PropTypes.func, | 39 | onChange: PropTypes.func, |
40 | onOpen: PropTypes.func, | 40 | onOpen: PropTypes.func, |
41 | onClose: PropTypes.func, | 41 | onClose: PropTypes.func, |
42 | autoComplete: PropTypes.string, | ||
42 | }, | 43 | }, |
43 | 44 | ||
44 | getDefaultProps() { | 45 | getDefaultProps() { |
@@ -61,6 +62,7 @@ const Picker = React.createClass({ | |||
61 | onChange: noop, | 62 | onChange: noop, |
62 | onOpen: noop, | 63 | onOpen: noop, |
63 | onClose: noop, | 64 | onClose: noop, |
65 | autoComplete: 'yes', | ||
64 | }; | 66 | }; |
65 | }, | 67 | }, |
66 | 68 | ||
@@ -182,7 +184,7 @@ const Picker = React.createClass({ | |||
182 | const { | 184 | const { |
183 | prefixCls, placeholder, placement, align, | 185 | prefixCls, placeholder, placement, align, |
184 | disabled, transitionName, style, className, showHour, | 186 | disabled, transitionName, style, className, showHour, |
185 | showSecond, getPopupContainer, | 187 | showSecond, getPopupContainer, autoComplete, |
186 | } = this.props; | 188 | } = this.props; |
187 | const { open, value } = this.state; | 189 | const { open, value } = this.state; |
188 | let popupClassName; | 190 | let popupClassName; |
@@ -211,6 +213,7 @@ const Picker = React.createClass({ | |||
211 | readOnly | 213 | readOnly |
212 | onKeyDown={this.onKeyDown} | 214 | onKeyDown={this.onKeyDown} |
213 | disabled={disabled} value={value && value.format(this.getFormat()) || ''} | 215 | disabled={disabled} value={value && value.format(this.getFormat()) || ''} |
216 | autoComplete={autoComplete} | ||
214 | /> | 217 | /> |
215 | <span className={`${prefixCls}-icon`}/> | 218 | <span className={`${prefixCls}-icon`}/> |
216 | </span> | 219 | </span> |