diff options
author | Christian Senk <senk.christian@googlemail.com> | 2017-09-12 19:12:40 +0200 |
---|---|---|
committer | Christian Senk <senk.christian@googlemail.com> | 2017-09-12 19:12:40 +0200 |
commit | e30387aba831b80ed9bcceafe1e2b66d69ee59cc (patch) | |
tree | 243b0a85cc29e79fb30c4d7cba51b0d09ec99125 /src/TimePicker.jsx | |
parent | 35d5ed7815f4707c79565a45261ffadc21d604be (diff) | |
download | time-picker-e30387aba831b80ed9bcceafe1e2b66d69ee59cc.tar.gz time-picker-e30387aba831b80ed9bcceafe1e2b66d69ee59cc.tar.zst time-picker-e30387aba831b80ed9bcceafe1e2b66d69ee59cc.zip |
add focus/blur support.
Diffstat (limited to 'src/TimePicker.jsx')
-rw-r--r-- | src/TimePicker.jsx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx index 2c6a1f1..6e16457 100644 --- a/src/TimePicker.jsx +++ b/src/TimePicker.jsx | |||
@@ -42,6 +42,8 @@ export default class Picker extends Component { | |||
42 | onChange: PropTypes.func, | 42 | onChange: PropTypes.func, |
43 | onOpen: PropTypes.func, | 43 | onOpen: PropTypes.func, |
44 | onClose: PropTypes.func, | 44 | onClose: PropTypes.func, |
45 | onFocus: PropTypes.func, | ||
46 | onBlur: PropTypes.func, | ||
45 | addon: PropTypes.func, | 47 | addon: PropTypes.func, |
46 | name: PropTypes.string, | 48 | name: PropTypes.string, |
47 | autoComplete: PropTypes.string, | 49 | autoComplete: PropTypes.string, |
@@ -69,6 +71,8 @@ export default class Picker extends Component { | |||
69 | onChange: noop, | 71 | onChange: noop, |
70 | onOpen: noop, | 72 | onOpen: noop, |
71 | onClose: noop, | 73 | onClose: noop, |
74 | onFocus: noop, | ||
75 | onBlur: noop, | ||
72 | addon: noop, | 76 | addon: noop, |
73 | use12Hours: false, | 77 | use12Hours: false, |
74 | }; | 78 | }; |
@@ -231,6 +235,7 @@ export default class Picker extends Component { | |||
231 | const { | 235 | const { |
232 | prefixCls, placeholder, placement, align, | 236 | prefixCls, placeholder, placement, align, |
233 | disabled, transitionName, style, className, getPopupContainer, name, autoComplete, | 237 | disabled, transitionName, style, className, getPopupContainer, name, autoComplete, |
238 | onFocus, onBlur, | ||
234 | } = this.props; | 239 | } = this.props; |
235 | const { open, value } = this.state; | 240 | const { open, value } = this.state; |
236 | const popupClassName = this.getPopupClassName(); | 241 | const popupClassName = this.getPopupClassName(); |
@@ -260,6 +265,8 @@ export default class Picker extends Component { | |||
260 | onKeyDown={this.onKeyDown} | 265 | onKeyDown={this.onKeyDown} |
261 | disabled={disabled} value={value && value.format(this.getFormat()) || ''} | 266 | disabled={disabled} value={value && value.format(this.getFormat()) || ''} |
262 | autoComplete={autoComplete} | 267 | autoComplete={autoComplete} |
268 | onFocus={onFocus} | ||
269 | onBlur={onBlur} | ||
263 | /> | 270 | /> |
264 | <span className={`${prefixCls}-icon`}/> | 271 | <span className={`${prefixCls}-icon`}/> |
265 | </span> | 272 | </span> |