From e30387aba831b80ed9bcceafe1e2b66d69ee59cc Mon Sep 17 00:00:00 2001 From: Christian Senk Date: Tue, 12 Sep 2017 19:12:40 +0200 Subject: add focus/blur support. --- src/TimePicker.jsx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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 { onChange: PropTypes.func, onOpen: PropTypes.func, onClose: PropTypes.func, + onFocus: PropTypes.func, + onBlur: PropTypes.func, addon: PropTypes.func, name: PropTypes.string, autoComplete: PropTypes.string, @@ -69,6 +71,8 @@ export default class Picker extends Component { onChange: noop, onOpen: noop, onClose: noop, + onFocus: noop, + onBlur: noop, addon: noop, use12Hours: false, }; @@ -231,6 +235,7 @@ export default class Picker extends Component { const { prefixCls, placeholder, placement, align, disabled, transitionName, style, className, getPopupContainer, name, autoComplete, + onFocus, onBlur, } = this.props; const { open, value } = this.state; const popupClassName = this.getPopupClassName(); @@ -260,6 +265,8 @@ export default class Picker extends Component { onKeyDown={this.onKeyDown} disabled={disabled} value={value && value.format(this.getFormat()) || ''} autoComplete={autoComplete} + onFocus={onFocus} + onBlur={onBlur} /> -- cgit v1.2.3