diff options
author | Adam Misiorny <adam.misiorny@gmail.com> | 2016-09-01 09:06:56 +0200 |
---|---|---|
committer | Adam Misiorny <adam.misiorny@gmail.com> | 2016-09-01 09:06:56 +0200 |
commit | 73e6cf7828e16b192e5980da49521473c1579a06 (patch) | |
tree | ed2de146c91ecd215fedc4f211d178ce9c23daf1 /src | |
parent | 4984ed85e54f442998a335db70618d6184fa397e (diff) | |
download | time-picker-73e6cf7828e16b192e5980da49521473c1579a06.tar.gz time-picker-73e6cf7828e16b192e5980da49521473c1579a06.tar.zst time-picker-73e6cf7828e16b192e5980da49521473c1579a06.zip |
add autocomplete option
Diffstat (limited to 'src')
-rw-r--r-- | src/TimePicker.jsx | 5 |
1 files changed, 4 insertions, 1 deletions
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> |