UNPKG

hamro-nepali-patro

Version:

A modern React component library for Nepali (Bikram Sambat, BS) and Gregorian (AD) calendar date picking, conversion, and utilities. Includes a customizable datepicker, BS/AD conversion, and Nepali date functions.

26 lines (25 loc) 1.3 kB
import { CalendarType, DateRange, IDateObject, DisableProps } from "../types/main"; 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; 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 };