Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fix WebsiteDateFilter width and date popup minimum width.

Mike Caod9f8a0418c97
diff --git a/src/components/input/DateFilter.tsx b/src/components/input/DateFilter.tsx
index 2e175298d..71014aaf2 100644
--- a/src/components/input/DateFilter.tsx
+++ b/src/components/input/DateFilter.tsx
@@ -110,7 +110,7 @@ export function DateFilter({
placeholder={formatMessage(labels.selectDate)}
onChange={handleChange}
renderValue={renderValue}
- popoverProps={{ placement }}
+ popoverProps={{ placement, style: { minWidth: 200 } }}
isFullscreen={isMobile}
>
{options.map(({ label, value, divider }: any) => {
diff --git a/src/components/input/WebsiteDateFilter.tsx b/src/components/input/WebsiteDateFilter.tsx
index 58e596f52..b4b38c6de 100644
--- a/src/components/input/WebsiteDateFilter.tsx
+++ b/src/components/input/WebsiteDateFilter.tsx
@@ -76,14 +76,13 @@ export function WebsiteDateFilter({
</Button>
</Row>
)}
- <Row minWidth="200px">
- <DateFilter
- value={dateValue}
- onChange={handleChange}
- showAllTime={hasData && showAllTime}
- renderDate={+offset !== 0}
- />
- </Row>
+ <DateFilter
+ className="min-w-[200px]"
+ value={dateValue}
+ onChange={handleChange}
+ showAllTime={hasData && showAllTime}
+ renderDate={+offset !== 0}
+ />
{showCompare && (
<Row alignItems="center" gap>
<Text weight="bold">VS</Text>