igniteui-webcomponents
Version:
Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.
31 lines (30 loc) • 1.57 kB
TypeScript
import { CalendarDay, type CalendarRangeParams, type DayParameter } from './model.js';
import { type DateRangeDescriptor, type WeekDays } from './types.js';
export declare const MONTHS_PER_ROW = 3;
export declare const YEARS_PER_ROW = 3;
export declare const YEARS_PER_PAGE = 15;
export declare function dateFromISOString(value: string | null): Date | null;
export declare function datesFromISOStrings(value: string | null): Date[] | null;
/**
* Returns the value of the selected/activated element (day/month/year) in the calendar view.
*
*/
export declare function getViewElement(event: Event): number;
export declare function getWeekDayNumber(value: WeekDays): number;
export declare function areSameMonth(first: DayParameter, second: DayParameter): boolean;
export declare function isNextMonth(target: DayParameter, origin: DayParameter): boolean;
export declare function isPreviousMonth(target: DayParameter, origin: DayParameter): boolean;
/**
* 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;