react-nepali-datetime-picker
Version:
A simple and reusable Nepali calendar, date and time picker components for React.
21 lines (20 loc) • 1.05 kB
TypeScript
import { Language } from '../types/Language';
import { Day, Month, NepaliDate, Year } from '../types/NepaliDate';
import { WeekDay } from '../types/WeekDay';
export declare const YEAR_MONTH_DATE_SEPARATOR = "/";
export declare const getCurrentNepaliDate: (lang?: Language) => NepaliDate;
export declare const getYears: (lang: Language) => Year[];
export declare const getMonths: (lang: Language, short?: boolean) => Month[];
export declare const getMonthLabel: (lang: Language, month?: number, short?: boolean) => string | null;
export declare const getMonthDatesByYear: ({ year, month, lang, }: {
year: number;
month: number;
lang?: Language | undefined;
}) => Array<Day>;
export declare const getWeekDays: (lang: Language, short?: boolean) => WeekDay[];
export declare const MAX_DATE_LENGTH = 10;
export declare const validateDate: (value: string, lang?: string, shortMonth?: boolean) => {
valid: boolean;
value?: NepaliDate | undefined;
};
export declare const formatNepaliDate: (date: NepaliDate, lang: Language) => string;