UNPKG

@cafebazaar/emrooz

Version:

Emrooz is a multilingual calendar built for Vue3. It also supports both Shamsi (Persian / Jalali) and Gregorian (English) calendars.

55 lines (54 loc) 2.01 kB
export declare type Lang = 'fa' | 'en'; export declare type Direction = 'rtl' | 'ltr'; export declare type AllowedDates = ((date: Date) => boolean) | null; export declare type CalendarType = 'shamsi' | 'miladi'; export declare type TupleDate = [year: number, month: number, day: number]; export declare type DateItem = TupleDate | null; export declare type SetDateItem = (date: DateItem) => void; export declare type CurrentDate = TupleDate; declare type CommonDate = { from: Date; to: Date; label: string; }; export declare type CommonDates = CommonDate[]; export declare type UnifyDateItem = Date | null; export declare type SetUnifyDateItem = (date: UnifyDateItem) => void; export interface DateInfo { year: number; month: number; } export declare type GeneralDateUtil = { getMonthDays: (dateInfo: DateInfo) => number; getFirstDayOfMonth: (dateInfo: DateInfo) => number; getLastDayOfMonth: (dateInfo: DateInfo) => number; getNextMonth: (dateInfo: DateInfo) => DateInfo; getPrevMonth: (dateInfo: DateInfo) => DateInfo; tupleToDate: (tuple: TupleDate) => Date; isClosed: (tuple: TupleDate) => boolean; }; export interface RangePickerSelectOutput { from: Date; to: Date; } export declare type RangePickerSelectInput = RangePickerSelectOutput | null; export interface RangePickerProps { lang?: Lang; commonDates?: CommonDates; allowedDates?: AllowedDates; type?: CalendarType; rangePickerClass?: any; modelValue?: RangePickerSelectInput; } export declare type RangePickerInputProps = Omit<RangePickerProps, 'rangePickerClass'>; export declare type DatePickerSelectOutput = Date; export declare type DatePickerSelectInput = DatePickerSelectOutput | null; export interface DatePickerProps { lang?: Lang; allowedDates?: AllowedDates; type?: CalendarType; datePickerClass?: any; modelValue?: DatePickerSelectInput; } export declare type DatePickerInputProps = Omit<DatePickerProps, 'datePickerClass'>; export {};