From: Julian Date: Sat, 10 Mar 2018 17:22:02 +0000 (-0500) Subject: Add id to input element X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=0414a01666ca1a4b8f6ed25fff0150f4b1eb6d6f;p=github%2Ffretlink%2Ftime-picker.git Add id to input element --- diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx index a37fec2..6de48b3 100644 --- a/src/TimePicker.jsx +++ b/src/TimePicker.jsx @@ -55,6 +55,7 @@ export default class Picker extends Component { focusOnOpen: PropTypes.bool, onKeyDown: PropTypes.func, autoFocus: PropTypes.bool, + id: PropTypes.string, }; static defaultProps = { @@ -85,6 +86,7 @@ export default class Picker extends Component { use12Hours: false, focusOnOpen: false, onKeyDown: noop, + id: '', }; constructor(props) { @@ -253,7 +255,7 @@ export default class Picker extends Component { render() { const { - prefixCls, placeholder, placement, align, + prefixCls, placeholder, placement, align, id, disabled, transitionName, style, className, getPopupContainer, name, autoComplete, onFocus, onBlur, autoFocus, inputReadOnly, } = this.props; @@ -290,6 +292,7 @@ export default class Picker extends Component { autoFocus={autoFocus} onChange={noop} readOnly={!!inputReadOnly} + id={id} />