diff --git a/ui/packages/evidently-ui-lib/src/components/DashboardDateFilter.tsx b/ui/packages/evidently-ui-lib/src/components/DashboardDateFilter.tsx index 002207c065..a302f28a5f 100644 --- a/ui/packages/evidently-ui-lib/src/components/DashboardDateFilter.tsx +++ b/ui/packages/evidently-ui-lib/src/components/DashboardDateFilter.tsx @@ -230,3 +230,102 @@ export const DashboardParams = ({ ) } + +export type DateFilterState = { + dateFrom?: Dayjs | null + dateTo?: Dayjs | null +} + +export interface DateFilterProps { + dates: DateFilterState + setDates: React.Dispatch> +} + +export const DateFilter = ({ dates, setDates }: DateFilterProps) => { + return ( + + + <> + + + Period + + + + + + setDates((prev) => ({ ...prev, dateFrom: value }))} + /> + + - + + setDates((prev) => ({ ...prev, dateTo: value }))} + /> + + + + + + Error + Incorrect time interval + + + + + + + ) +}