mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Fixed "All time" and "Custom range" date selections.
This commit is contained in:
parent
858864ef7f
commit
a24e8b6396
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue