From 73e6cf7828e16b192e5980da49521473c1579a06 Mon Sep 17 00:00:00 2001 From: Adam Misiorny Date: Thu, 1 Sep 2016 09:06:56 +0200 Subject: add autocomplete option --- README.md | 1 + src/TimePicker.jsx | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ae31aa..5d8822a 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ API | onChange | Function | null | called when select a different value | | placement | String | bottomLeft | one of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'] | | transitionName | String | '' | | +| autoComplete | String | 'yes' | one of ['yes', 'no'] | ## 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({ onChange: PropTypes.func, onOpen: PropTypes.func, onClose: PropTypes.func, + autoComplete: PropTypes.string, }, getDefaultProps() { @@ -61,6 +62,7 @@ const Picker = React.createClass({ onChange: noop, onOpen: noop, onClose: noop, + autoComplete: 'yes', }; }, @@ -182,7 +184,7 @@ const Picker = React.createClass({ const { prefixCls, placeholder, placement, align, disabled, transitionName, style, className, showHour, - showSecond, getPopupContainer, + showSecond, getPopupContainer, autoComplete, } = this.props; const { open, value } = this.state; let popupClassName; @@ -211,6 +213,7 @@ const Picker = React.createClass({ readOnly onKeyDown={this.onKeyDown} disabled={disabled} value={value && value.format(this.getFormat()) || ''} + autoComplete={autoComplete} /> -- cgit v1.2.3