UNPKG

igniteui-angular

Version:

Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps

26 lines (25 loc) 1.72 kB
import { CalendarDay, CalendarRangeParams, DayParameter } from "./model"; import { DateRangeDescriptor } from "./types"; export declare function areSameMonth(firstMonth: DayParameter, secondMonth: DayParameter): boolean; export declare function isNextMonth(target: DayParameter, origin: DayParameter): boolean; export declare function isPreviousMonth(target: DayParameter, origin: DayParameter): boolean; /** Returns the next date starting from `start` that does not match the `disabled` descriptors */ export declare function getNextActiveDate(start: CalendarDay, disabled?: DateRangeDescriptor[]): CalendarDay; /** Returns the previous date starting from `start` that does not match the `disabled` descriptors */ export declare function getPreviousActiveDate(start: CalendarDay, disabled?: DateRangeDescriptor[]): CalendarDay; export declare function getClosestActiveDate(start: CalendarDay, delta: number, disabled?: DateRangeDescriptor[]): CalendarDay; /** * Returns a generator yielding day values between `start` and `end` (non-inclusive) * by a given `unit` as a step. * * @remarks * By default, `unit` is set to 'day'. */ export declare function calendarRange(options: CalendarRangeParams): Generator<CalendarDay, void, unknown>; export declare function generateMonth(value: DayParameter, firstWeekDay: number): Generator<CalendarDay, void, unknown>; export declare function getYearRange(current: DayParameter, range: number): { start: number; end: number; }; export declare function isDateInRanges(date: DayParameter, ranges: DateRangeDescriptor[]): boolean; export declare function formatToParts(date: Date, locale: string, options: Intl.DateTimeFormatOptions, parts: string[]): Record<string, any>;