Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Fixed "All time" and "Custom range" date selections.
Mike Caoa24e8b6396bb
diff --git a/src/components/input/DateFilter.tsx b/src/components/input/DateFilter.tsxindex 0c29afa6b..afe44e6fd 100644--- a/src/components/input/DateFilter.tsx+++ b/src/components/input/DateFilter.tsx@@ -92,7 +92,7 @@ export function DateFilter({const handleClose = () => setShowPicker(false);const renderValue = (value: string) => {- const { unit } = parseDateValue(value);+ const { unit } = parseDateValue(value) || {};if (offset && unit === 'year') {return formatDate(startDate, 'yyyy', locale);diff --git a/src/lib/date.ts b/src/lib/date.tsindex 01cc19318..cf2f09df5 100644--- a/src/lib/date.ts+++ b/src/lib/date.ts@@ -260,7 +260,7 @@ export function getOffsetDateRange(dateRange: DateRange, increment: number) {const change = num * increment;const { add } = DATE_FUNCTIONS[unit];- const { unit: originalUnit } = parseDateValue(value);+ const { unit: originalUnit } = parseDateValue(value) || {};switch (originalUnit) {case 'week':