UNPKG

@doku-dev/doku-fragment

Version:

A new Angular UI library that moving away from Bootstrap and built from scratch.

45 lines (44 loc) 1.64 kB
import { DokuSelectOptionItem } from '../../select'; interface ItemOption { label: string; value: string; } export type MonthSelectOption = ItemOption; export type YearSelectOption = ItemOption; export declare class CalendarUtil { private static readonly DEFAULT_LOCALE; private static oneDayInSecond; static generateMonthSelectOptions(props: { activeYear: number; locale?: string; minDate?: Date | null; maxDate?: Date | null; }): DokuSelectOptionItem[]; static generateYearSelectOptions(props: { activeYear: number; minDate?: Date | null; maxDate?: Date | null; }): DokuSelectOptionItem[]; static generateWeekdays(options?: { locale?: string; }): string[]; static generateDates({ month, year }: { month: number; year: number; }): Date[]; static isValidMinYear(minDate: Date, checkedDate: Date): boolean; static isValidMinMonth(minDate: Date, checkedDate: Date): boolean; static isValidMinDate(minDate: Date, checkedDate: Date, options?: { useStrictTime?: boolean; }): boolean; static isValidMaxYear(maxDate: Date, checkedDate: Date): boolean; static isValidMaxMonth(maxDate: Date, checkedDate: Date): boolean; static isValidMaxDate(maxDate: Date, checkedDate: Date, options?: { useStrictTime?: boolean; }): boolean; static isSameDate(date?: Date | null, anotherDate?: Date | null): boolean; static isInvalidMinOrMaxDate(date: Date, minDate?: Date | null, maxDate?: Date | null, options?: { useStrictTime?: boolean; }): boolean; } export {};