mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-22 09:57:00 +01:00
Fixed date buttons for today/yesterday selection.
This commit is contained in:
parent
300a0f63e7
commit
87b947d174
@ -263,6 +263,13 @@ export function getOffsetDateRange(dateRange: DateRange, increment: number) {
|
||||
const { unit: originalUnit } = parseDateValue(value) || {};
|
||||
|
||||
switch (originalUnit) {
|
||||
case 'day':
|
||||
return {
|
||||
...dateRange,
|
||||
startDate: addDays(startDate, increment),
|
||||
endDate: addDays(endDate, increment),
|
||||
offset: offset + increment,
|
||||
};
|
||||
case 'week':
|
||||
return {
|
||||
...dateRange,
|
||||
|
Loading…
Reference in New Issue
Block a user