diff --git a/web/ui/mantine-ui/src/pages/query/RangeInput.tsx b/web/ui/mantine-ui/src/pages/query/RangeInput.tsx index fc8950d5bd..a46b083efb 100644 --- a/web/ui/mantine-ui/src/pages/query/RangeInput.tsx +++ b/web/ui/mantine-ui/src/pages/query/RangeInput.tsx @@ -69,14 +69,6 @@ const RangeInput: FC = ({ range, onChangeRange }) => { return ( - - - setRangeInput(event.currentTarget.value)} @@ -85,16 +77,32 @@ const RangeInput: FC = ({ range, onChangeRange }) => { event.key === "Enter" && onChangeRangeInput(rangeInput) } aria-label="Range" - style={{ width: rangeInput.length + 3 + "ch" }} + style={{ width: `calc(43px + ${rangeInput.length + 3}ch)` }} + leftSection={ + + + + } + rightSection={ + + + + } + leftSectionPointerEvents="all" + rightSectionPointerEvents="all" /> - - - ); }; diff --git a/web/ui/mantine-ui/src/pages/query/TimeInput.tsx b/web/ui/mantine-ui/src/pages/query/TimeInput.tsx index 5d74043a7c..cc332c02bf 100644 --- a/web/ui/mantine-ui/src/pages/query/TimeInput.tsx +++ b/web/ui/mantine-ui/src/pages/query/TimeInput.tsx @@ -1,4 +1,4 @@ -import { Group, ActionIcon } from "@mantine/core"; +import { Group, ActionIcon, CloseButton } from "@mantine/core"; import { DatesProvider, DateTimePicker } from "@mantine/dates"; import { IconChevronLeft, IconChevronRight } from "@tabler/icons-react"; import { FC } from "react"; @@ -22,21 +22,12 @@ const TimeInput: FC = ({ return ( - onChangeTime(baseTime() - range / 2)} - > - - onChangeTime(value ? value.getTime() : null)} aria-label={description} @@ -46,17 +37,47 @@ const TimeInput: FC = ({ onChangeTime(baseTime()); } }} + leftSection={ + onChangeTime(baseTime() - range / 2)} + > + + + } + styles={{ section: { width: "unset" } }} + rightSection={ + <> + {time && ( + event.preventDefault()} + tabIndex={-1} + onClick={() => { + onChangeTime(null); + }} + size="xs" + /> + )} + onChangeTime(baseTime() + range / 2)} + > + + + + } /> - onChangeTime(baseTime() + range / 2)} - > - - ); };