diff --git a/components/date-picker/RangePicker.tsx b/components/date-picker/RangePicker.tsx index ea0a6a4b47..456724b899 100644 --- a/components/date-picker/RangePicker.tsx +++ b/components/date-picker/RangePicker.tsx @@ -123,9 +123,9 @@ export default class RangePicker extends React.Component { handleHoverChange = hoverValue => this.setState({ hoverValue }); - setValue(value) { + setValue(value, hidePanel?) { this.handleChange(value); - if (!this.props.showTime) { + if (hidePanel || !this.props.showTime) { this.setState({ open: false }); } } @@ -145,7 +145,7 @@ export default class RangePicker extends React.Component { return ( this.setValue(value)} + onClick={() => this.setValue(value, true)} onMouseEnter={() => this.setState({ hoverValue: value })} onMouseLeave={this.clearHoverValue} >