diff --git a/ui/src/List/TimerangeSelector.tsx b/ui/src/List/TimerangeSelector.tsx index 018cfb1..c3046bc 100644 --- a/ui/src/List/TimerangeSelector.tsx +++ b/ui/src/List/TimerangeSelector.tsx @@ -9,11 +9,7 @@ import { zonedTimeToUtc } from "date-fns-tz"; import { addDays, addMilliseconds, differenceInMilliseconds } from "date-fns"; import startOfDay from "date-fns/startOfDay"; import Card from "@material-ui/core/Card"; -import { - ThemeProvider, - createMuiTheme, - useTheme, -} from "@material-ui/core/styles"; +import { useTheme } from "@material-ui/core/styles"; import TextField from "@material-ui/core/TextField"; import FormControlLabel from "@material-ui/core/FormControlLabel"; import FormLabel from "@material-ui/core/FormLabel"; @@ -217,17 +213,6 @@ const TimerangeSelector = ({ setRange90k, }: Props) => { const theme = useTheme(); - - // StaticDatePicker doesn't have an obvious way to use the secondary theme - // colors, so make a new theme with swapped colors. - const swappedTheme = createMuiTheme({ - ...theme, - palette: { - ...theme.palette, - primary: theme.palette.secondary, - secondary: theme.palette.primary, - }, - }); const [days, updateDays] = React.useReducer(daysStateReducer, { allowed: null, rangeMillis: null, @@ -275,25 +260,21 @@ const TimerangeSelector = ({
From - - { - updateDays({ op: "set-start-day", newStartDate: d }); - }} - renderInput={(params) => ( - - )} - /> - + { + updateDays({ op: "set-start-day", newStartDate: d }); + }} + renderInput={(params) => } + /> { @@ -328,25 +309,23 @@ const TimerangeSelector = ({ /> - - - days.endType !== "other-day" || shouldDisableDate(d) - } - maxDate={ - startDate === null ? today : new Date(days.allowed!.maxMillis) - } - minDate={startDate === null ? today : startDate} - onChange={(d: Date | null) => { - updateDays({ op: "set-end-day", newEndDate: d! }); - }} - renderInput={(params) => ( - - )} - /> - + + days.endType !== "other-day" || shouldDisableDate(d) + } + maxDate={ + startDate === null ? today : new Date(days.allowed!.maxMillis) + } + minDate={startDate === null ? today : startDate} + onChange={(d: Date | null) => { + updateDays({ op: "set-end-day", newEndDate: d! }); + }} + renderInput={(params) => ( + + )} + />