export type DateRange = Date | null | [Date, Date] | [Date, null]; export type ComparePeriods = 'None' | 'Previous day' | 'Previous week' | 'Previous month' | 'Previous year'; export interface DatePickerProps { className?: string; e2eClassName?: string; startDate: Date; endDate: Date | null; minDate?: Date; maxDate?: Date; showComparePeriod?: boolean; dateFormat?: string; vertical?: boolean; defaultComparePeriod?: ComparePeriods; timeZone?: string; onDateChange: (dates: DateRange) => void; onComparePeriodChange?: (prevPeriod: string) => void; submitButtonText?: string; onSubmitButtonClick?: (dates: DateRange) => void; } export enum DateRanges { Today = 'Today', Yesterday = 'Yesterday', Last7Days = 'Last7Days', Last30Days = 'Last30Days', Last90Days = 'Last90Days', LastMonth = 'LastMonth', Last12Months = 'Last12Months', WeekToDate = 'WeekToDate', MonthToDate = 'MonthToDate', YearToDate = 'YearToDate', } export interface StyledComponentsProps { vertical?: boolean; } export type DateRangesValue = { label: string; startDate: Date; endDate: Date; }; export type DateRangesType = Record;