Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

Commit 3334aa1

Browse files
committed
Fix wrong daterange on hover bug
1 parent 4d24ea8 commit 3334aa1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/DateRangePicker/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ class DateRangePicker extends Component {
2020
<div className={classnames(this.styles.dateRangePickerWrapper, this.props.className)}>
2121
<DefinedRange
2222
focusedRange={focusedRange}
23-
onPreviewChange={value => this.dateRange.updatePreview(value)}
23+
onPreviewChange={value =>
24+
this.dateRange.updatePreview(
25+
value ? this.dateRange.calcNewSelection(value, typeof value === 'string') : null
26+
)
27+
}
2428
{...this.props}
2529
range={this.props.ranges[focusedRange[0]]}
2630
className={undefined}

0 commit comments

Comments
 (0)