persian-fullcalendar
Version:
React component that helps you to makes simple Farsi/Jalali/Shamsi date picker. It also has range date picker you can select multiple days in multiple months.
24 lines (23 loc) • 876 B
TypeScript
import type { DaysRange, DatePickerValue, onRangeDatePickerChangePayload, onDatePickerChangePayload } from '../../types';
export interface CalendarBaseProps {
defaultValue?: Date;
defaultTime?: number;
weekends?: DaysRange[];
className?: string;
events: any[];
width: string;
onChecked?: (value: any) => void;
}
export interface CalendarRangeProps {
range: true;
from?: DatePickerValue;
to?: DatePickerValue;
rangeValue?: Date[];
onChange?: (args: onRangeDatePickerChangePayload) => void;
}
export interface CalendarDefaultProps {
range?: false | undefined;
onChange?: (args: onDatePickerChangePayload) => void;
}
export type OnChangePayload = onRangeDatePickerChangePayload | onDatePickerChangePayload;
export type CalendarProps = CalendarBaseProps & (CalendarRangeProps | CalendarDefaultProps);