@kadconsulting/dry
Version:
KAD Reusable Component Library
38 lines (37 loc) • 1.21 kB
TypeScript
import type { ReactNode, CSSProperties } from 'react';
export interface DatePickerProps {
'data-testid'?: string;
initialDate?: Date;
dateFormat?: string;
localization?: string;
timeZone?: string;
disabledDates?: Date[];
holidays?: Date[];
onDateChange?: (date: Date) => void;
onMonthChange?: (date: Date) => void;
onShow?: () => void;
onHide?: () => void;
additionalClassNames?: string;
onPrevMonthClick?: () => void;
onNextMonthClick?: () => void;
buttonText?: string;
buttonIcon?: React.ReactNode;
position?: 'top' | 'bottom' | 'left' | 'right';
isShowing?: boolean;
selectedDate?: Date | null;
weekStartDay?: 'Sun' | 'Mon';
minDate?: Date;
maxDate?: Date;
disableWeekends?: boolean;
customDateRenderer?: (date: Date) => ReactNode;
customStyles?: CSSProperties;
multiSelect?: boolean;
showWithoutButton: boolean;
selectedDates?: Date[];
onDateRangeChange?: (startDate: Date | null, endDate: Date | null) => void;
isLoading?: boolean;
hasTimeSelector?: boolean;
hasYearAndMonthSelector?: boolean;
rangeLimit?: number | null;
daysUntilBookingAllowed?: number | null;
}