We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35e5a81 commit d20e0eaCopy full SHA for d20e0ea
src/components/DateRange/index.js
@@ -24,7 +24,6 @@ class DateRange extends Component {
24
if (!selectedRange || !onChange) return {};
25
26
let { startDate, endDate } = selectedRange;
27
- if (!endDate) endDate = new Date(startDate);
28
let nextFocusRange;
29
if (!isSingleValue) {
30
startDate = value.startDate;
@@ -36,6 +35,10 @@ class DateRange extends Component {
36
35
if (moveRangeOnFirstSelection) {
37
return addDays(value, dayOffset);
38
}
+ // allow continous range to stay as-is
39
+ if (!endDate) {
40
+ return endDate;
41
+ }
42
return !isBefore(value, endDate) ? value : endDate;
43
};
44
startDate = value;
0 commit comments