aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJulian <andrewjurai@gmail.com>2018-03-10 12:22:02 -0500
committerJulian <andrewjurai@gmail.com>2018-03-10 12:22:02 -0500
commit0414a01666ca1a4b8f6ed25fff0150f4b1eb6d6f (patch)
treeddb9a7a8aa3bf4b075a1db9ad47f2ccd22533a33
parent0cb7397ecc25d3724843ae7e098a4d8bf1c04076 (diff)
downloadtime-picker-0414a01666ca1a4b8f6ed25fff0150f4b1eb6d6f.tar.gz
time-picker-0414a01666ca1a4b8f6ed25fff0150f4b1eb6d6f.tar.zst
time-picker-0414a01666ca1a4b8f6ed25fff0150f4b1eb6d6f.zip
Add id to input element
-rw-r--r--src/TimePicker.jsx5
1 files changed, 4 insertions, 1 deletions
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 {
55 focusOnOpen: PropTypes.bool, 55 focusOnOpen: PropTypes.bool,
56 onKeyDown: PropTypes.func, 56 onKeyDown: PropTypes.func,
57 autoFocus: PropTypes.bool, 57 autoFocus: PropTypes.bool,
58 id: PropTypes.string,
58 }; 59 };
59 60
60 static defaultProps = { 61 static defaultProps = {
@@ -85,6 +86,7 @@ export default class Picker extends Component {
85 use12Hours: false, 86 use12Hours: false,
86 focusOnOpen: false, 87 focusOnOpen: false,
87 onKeyDown: noop, 88 onKeyDown: noop,
89 id: '',
88 }; 90 };
89 91
90 constructor(props) { 92 constructor(props) {
@@ -253,7 +255,7 @@ export default class Picker extends Component {
253 255
254 render() { 256 render() {
255 const { 257 const {
256 prefixCls, placeholder, placement, align, 258 prefixCls, placeholder, placement, align, id,
257 disabled, transitionName, style, className, getPopupContainer, name, autoComplete, 259 disabled, transitionName, style, className, getPopupContainer, name, autoComplete,
258 onFocus, onBlur, autoFocus, inputReadOnly, 260 onFocus, onBlur, autoFocus, inputReadOnly,
259 } = this.props; 261 } = this.props;
@@ -290,6 +292,7 @@ export default class Picker extends Component {
290 autoFocus={autoFocus} 292 autoFocus={autoFocus}
291 onChange={noop} 293 onChange={noop}
292 readOnly={!!inputReadOnly} 294 readOnly={!!inputReadOnly}
295 id={id}
293 /> 296 />
294 <span className={`${prefixCls}-icon`}/> 297 <span className={`${prefixCls}-icon`}/>
295 </span> 298 </span>