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

Fix analytics max date range

parent 4edbb1e2
...@@ -72,6 +72,10 @@ export default { ...@@ -72,6 +72,10 @@ export default {
const dayDifference = getDayDifference(this.startDate, this.endDate); const dayDifference = getDayDifference(this.startDate, this.endDate);
return this.includeSelectedDate ? dayDifference + OFFSET_DATE_BY_ONE : dayDifference; return this.includeSelectedDate ? dayDifference + OFFSET_DATE_BY_ONE : dayDifference;
}, },
effectiveMaxDateRange() {
const { includeSelectedDate, maxDateRange } = this;
return includeSelectedDate ? maxDateRange - OFFSET_DATE_BY_ONE : maxDateRange;
},
}, },
}; };
</script> </script>
...@@ -86,7 +90,7 @@ export default { ...@@ -86,7 +90,7 @@ export default {
:default-start-date="startDate" :default-start-date="startDate"
:default-end-date="endDate" :default-end-date="endDate"
:default-min-date="minDate" :default-min-date="minDate"
:max-date-range="maxDateRange" :max-date-range="effectiveMaxDateRange"
:default-max-date="maxDate" :default-max-date="maxDate"
theme="animate-picker" 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" 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