mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Pass original date in dataset.
This commit is contained in:
parent
3a737e7e25
commit
c61f089729
2 changed files with 2 additions and 3 deletions
|
|
@ -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 }));
|
||||
|
|
|
|||
|
|
@ -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) }));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue