@pagamio/frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
56 lines (55 loc) • 1.24 kB
TypeScript
import 'react-date-range/dist/styles.css';
import 'react-date-range/dist/theme/default.css';
import React from 'react';
export interface RangeDatePickerProps {
/**
* Selected date range
*/
dateRange?: {
startDate: Date;
endDate: Date;
key?: string;
};
/**
* Handler for date range changes
*/
onChange?: (range: {
startDate: Date;
endDate: Date;
key: string;
}) => void;
/**
* Minimum selectable date
*/
minDate?: Date;
/**
* Maximum selectable date
*/
maxDate?: Date;
/**
* CSS classes to apply to the container
*/
className?: string;
/**
* Number of months to display
* @default 2
*/
months?: number;
/**
* Direction to display months ('horizontal' or 'vertical')
* @default 'horizontal'
*/
direction?: 'horizontal' | 'vertical';
/**
* Whether to display preview of selected range
* @default true
*/
showPreview?: boolean;
/**
* Initial key for the range
* @default 'selection'
*/
rangeKey?: string;
}
declare const RangeDatePicker: React.FC<RangeDatePickerProps>;
export default RangeDatePicker;