Skip to content

armgit / umami

Public Imported from GitHub
0

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.

Pass original date in dataset.

Mike Caoc61f08972917
diff --git a/src/components/input/WebsiteDateFilter.tsx b/src/components/input/WebsiteDateFilter.tsx
index b2121a42e..34d1d6147 100644
--- a/src/components/input/WebsiteDateFilter.tsx
+++ b/src/components/input/WebsiteDateFilter.tsx
@@ -38,8 +38,7 @@ export function WebsiteDateFilter({
const isAllTime = value === 'all';
const isCustomRange = value.startsWith('range');
- const disableForward =
- value === 'all' || isAfter(getOffsetDateRange(dateRange, 1).startDate, new Date());
+ const disableForward = value === 'all' || isAfter(endDate, new Date());
const handleChange = (date: string | DateRange) => {
router.push(renderUrl({ date }));
diff --git a/src/components/metrics/PageviewsChart.tsx b/src/components/metrics/PageviewsChart.tsx
index 00a2625a3..5160cb5b9 100644
--- a/src/components/metrics/PageviewsChart.tsx
+++ b/src/components/metrics/PageviewsChart.tsx
@@ -88,5 +88,5 @@ export function PageviewsChart({ data, unit, ...props }: PageviewsChartProps) {
}
function convertDataset(data: { x: string; y: number }[], unit: string, locale?: any) {
- return data.map(d => ({ ...d, x: formatDateByUnit(d.x, unit, locale) }));
+ return data.map(d => ({ ...d, d: d.x, x: formatDateByUnit(d.x, unit, locale) }));
}