mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Fixed date buttons for today/yesterday selection.
This commit is contained in:
parent
300a0f63e7
commit
87b947d174
1 changed files with 7 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue