react-patro
Version:
AD and BS Calendar functions as hooks and component
26 lines (25 loc) • 1.34 kB
TypeScript
import { CalendarType, DateRange, IDateObject, DisableProps } from "../types/main";
declare type ADBSDateType = {
ad: IDateObject;
bs: IDateObject;
};
declare const getTodaysDate: () => ADBSDateType;
declare function checkIsSelected(selectedData: IDateObject, adDate: IDateObject): boolean;
declare function checkIsToday(adDate: IDateObject): boolean;
export declare function checkIsDisabled(adDateObj: IDateObject, disableConfig: DisableProps, dateFormat: string, bsDateObj: IDateObject, isAD?: boolean): boolean;
export declare function checkIsInRange(adDateObj: IDateObject, range: DateRange): boolean;
export declare function checkIsRangeBoundary(adDateObj: IDateObject, range?: DateRange): boolean;
declare const getMonthOffset: (dateObj: {
year: number;
month: number;
date: number;
}, offset: number, calendarType: CalendarType) => IDateObject;
export declare const getSubDate: (mainDate: IDateObject, isAD: boolean) => IDateObject;
declare type AllDateProps = {
maxDate?: string | null;
minDate?: string | null;
defaultValue?: string | null;
value?: string | null;
};
export declare const checkDatePropsValidity: (allDateProps: AllDateProps, dateFormat: string, calendarType: CalendarType) => void;
export { getTodaysDate, checkIsToday, checkIsSelected, getMonthOffset };