Commit 187081d4 authored by Brandon Labuschagne's avatar Brandon Labuschagne

Fix analytics max date range

parent 4edbb1e2
......@@ -72,6 +72,10 @@ export default {
const dayDifference = getDayDifference(this.startDate, this.endDate);
return this.includeSelectedDate ? dayDifference + OFFSET_DATE_BY_ONE : dayDifference;
},
effectiveMaxDateRange() {
const { includeSelectedDate, maxDateRange } = this;
return includeSelectedDate ? maxDateRange - OFFSET_DATE_BY_ONE : maxDateRange;
},
},
};
</script>
......@@ -86,7 +90,7 @@ export default {
:default-start-date="startDate"
:default-end-date="endDate"
:default-min-date="minDate"
:max-date-range="maxDateRange"
:max-date-range="effectiveMaxDateRange"
:default-max-date="maxDate"
theme="animate-picker"
start-picker-class="js-daterange-picker-from d-flex flex-column flex-lg-row align-items-lg-center mr-lg-2 mb-2 mb-md-0"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment