X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=src%2FTimePicker.jsx;h=7d2395d3558d255c7fc966acd9a12b2efb8da669;hb=56fb7b1b9cc2e36e6af5a3f33ccb55ac7dcb475e;hp=e6c203159883c361e9628441e69da8fc77d73c78;hpb=ee6394229b2340c70c342851ecf5dba3462ac4ef;p=github%2Ffretlink%2Ftime-picker.git diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx index e6c2031..7d2395d 100644 --- a/src/TimePicker.jsx +++ b/src/TimePicker.jsx @@ -42,6 +42,7 @@ const Picker = React.createClass({ onClose: PropTypes.func, addon: PropTypes.func, name: PropTypes.string, + autoComplete: PropTypes.string, }, getDefaultProps() { @@ -70,6 +71,7 @@ const Picker = React.createClass({ }, getInitialState() { + this.saveInputRef = refFn.bind(this, 'picker'); this.savePanelRef = refFn.bind(this, 'panelInstance'); const { defaultOpen, defaultValue, open = defaultOpen, value = defaultValue } = this.props; return { @@ -105,7 +107,7 @@ const Picker = React.createClass({ onEsc() { this.setOpen(false); - this.refs.picker.focus(); + this.picker.focus(); }, onKeyDown(e) { @@ -189,6 +191,7 @@ const Picker = React.createClass({ prefixCls, placeholder, placement, align, disabled, transitionName, style, className, showHour, showMinute, showSecond, getPopupContainer, name, + showSecond, getPopupContainer, autoComplete, } = this.props; const { open, value } = this.state; let popupClassName; @@ -213,11 +216,14 @@ const Picker = React.createClass({