aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorWei Zhu <yesmeck@gmail.com>2018-03-12 10:49:39 +0800
committerGitHub <noreply@github.com>2018-03-12 10:49:39 +0800
commit77862aea6a529152c46fd43dee5fc48fce8100e8 (patch)
tree1061d8777cb605d1e036764432740c599c896343 /src
parent0cb7397ecc25d3724843ae7e098a4d8bf1c04076 (diff)
parent4dc88036b4a4e077a5e7d5208ea3d100816a8a25 (diff)
downloadtime-picker-77862aea6a529152c46fd43dee5fc48fce8100e8.tar.gz
time-picker-77862aea6a529152c46fd43dee5fc48fce8100e8.tar.zst
time-picker-77862aea6a529152c46fd43dee5fc48fce8100e8.zip
Merge pull request #97 from Julian-Jurai/add-id-attribute-to-input-el
Add id to input element
Diffstat (limited to 'src')
-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..26166f4 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 = {
@@ -65,6 +66,7 @@ export default class Picker extends Component {
65 style: {}, 66 style: {},
66 className: '', 67 className: '',
67 popupClassName: '', 68 popupClassName: '',
69 id: '',
68 align: {}, 70 align: {},
69 defaultOpenValue: moment(), 71 defaultOpenValue: moment(),
70 allowEmpty: true, 72 allowEmpty: true,
@@ -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>