mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Disable filter on custom range.
This commit is contained in:
parent
080eb34d57
commit
cf1dd422fe
1 changed files with 4 additions and 2 deletions
|
|
@ -9,7 +9,9 @@ export function WebsiteDateFilter({ websiteId }) {
|
|||
const [dateRange, setDateRange] = useDateRange(websiteId);
|
||||
const { value, startDate, endDate, selectedUnit } = dateRange;
|
||||
const isFutureDate =
|
||||
value !== 'all' && isAfter(incrementDateRange(dateRange, -1).startDate, new Date());
|
||||
value !== 'all' &&
|
||||
selectedUnit &&
|
||||
isAfter(incrementDateRange(dateRange, -1).startDate, new Date());
|
||||
|
||||
const handleChange = value => {
|
||||
setDateRange(value);
|
||||
|
|
@ -21,7 +23,7 @@ export function WebsiteDateFilter({ websiteId }) {
|
|||
|
||||
return (
|
||||
<Flexbox justifyContent="center" gap={10}>
|
||||
{value !== 'all' && (
|
||||
{value !== 'all' && selectedUnit && (
|
||||
<Flexbox justifyContent="center" className={styles.buttons}>
|
||||
<Button onClick={() => handleIncrement(1)}>
|
||||
<Icon rotate={90}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue