igniteui-angular
Version:
Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps
75 lines (74 loc) • 1.91 kB
TypeScript
/**
* Sets the selection type - single, multi or range.
*/
export declare const CalendarSelection: {
SINGLE: "single";
MULTI: "multi";
RANGE: "range";
};
export type CalendarSelection = (typeof CalendarSelection)[keyof typeof CalendarSelection];
export declare const enum ScrollDirection {
PREV = "prev",
NEXT = "next",
NONE = "none"
}
export interface IViewDateChangeEventArgs {
previousValue: Date;
currentValue: Date;
}
export declare const IgxCalendarView: {
Month: "month";
Year: "year";
Decade: "decade";
};
/**
* Determines the Calendar active view - days, months or years.
*/
export type IgxCalendarView = (typeof IgxCalendarView)[keyof typeof IgxCalendarView];
export declare const range: (start: number, stop: number, step?: number) => any[];
/**
* Returns true for leap years, false for non-leap years.
*
* @export
* @param year
* @returns
*/
export declare const isLeap: (year: number) => boolean;
export declare const weekDay: (year: number, month: number, day: number) => number;
/**
* Return weekday and number of days for year, month.
*
* @export
* @param year
* @param month
* @returns
*/
export declare const monthRange: (year: number, month: number) => number[];
export interface IFormattedParts {
value: string;
literal?: string;
combined: string;
}
export interface IFormattingOptions {
day?: 'numeric' | '2-digit';
month?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow';
weekday?: 'long' | 'short' | 'narrow';
year?: 'numeric' | '2-digit';
}
export interface IFormattingViews {
day?: boolean;
month?: boolean;
year?: boolean;
}
export declare enum WEEKDAYS {
SUNDAY = 0,
MONDAY = 1,
TUESDAY = 2,
WEDNESDAY = 3,
THURSDAY = 4,
FRIDAY = 5,
SATURDAY = 6
}
export declare class Calendar {
timedelta(date: Date, interval: string, units: number): Date;
}