import DropDownButton = require("./form/DropDownButton"); import _Widget = require("./_Widget"); import _TemplatedMixin = require("./_TemplatedMixin"); import { _WidgetBaseConstructor } from "./_WidgetBase"; import { CSSStateNodes, _CssStateMixin } from "./_CssStateMixin"; import { _MonthWidgetConstructor, CalendarLite } from "./CalendarLite"; interface _MonthDropDownButton extends DropDownButton<_MonthDropDown> { onMonthSelect(): void; postCreate(): void; set(name: 'month', value: number): this; set(name: string, value: any): this; set(values: Object): this; } type _MonthDropDownButtonConstructor = _WidgetBaseConstructor<_MonthDropDownButton>; interface _MonthDropDown extends _Widget, _TemplatedMixin, _CssStateMixin { months: string[]; baseClass: string; templateString: string; /** * Callback when month is selected from drop down */ onChange(month: number): void; set(name: 'months', value: string[]): this; set(name: string, value: any): this; set(values: Object): this; } type _MonthDropDownConstructor = _WidgetBaseConstructor<_MonthDropDown>; interface Calendar extends CalendarLite, _Widget, _CssStateMixin { baseClass: string; /** * Set node classes for various mouse events, see dijit._CssStateMixin for more details */ cssStateNodes: CSSStateNodes; /** * Creates the drop down button that displays the current month and lets user pick a new one */ _createMonthWidget(): _MonthDropDownButton; postCreate(): void; /** * Handler for when user selects a month from the drop down list */ _onMonthSelect(newMonth: number): void; /** * Handler for mouse over events on days, sets hovered style */ _onDayMouseOver(evt: MouseEvent): void; /** * Handler for mouse out events on days, clears hovered style */ _onDayMouseOut(evt: MouseEvent): void; _onDayMouseDown(evt: MouseEvent): void; _onDayMouseUp(evt: MouseEvent): void; /** * Provides keyboard navigation of calendar. */ handleKey(evt: KeyboardEvent): void; /** * For handling keydown events on a stand alone calendar */ _onKeyDown(evt: KeyboardEvent): void; /** * Deprecated. Notification that a date cell was selected. It may be the same as the previous value. */ onValueSelected(date: Date): void; onChange(date: Date): void; /** * May be overridden to return CSS classes to associate with the date entry for the given dateObject * for example to indicate a holiday in specified locale. */ getClassForDate(dateObject: Date, locale?: string): string; get(name: 'value'): Date; get(name: string): any; set(name: 'value', value: number | Date): this; set(name: string, value: any): this; set(values: Object): this; } interface CalendarConstructor extends _WidgetBaseConstructor { _MonthWidget: _MonthWidgetConstructor; _MonthDropDown: _MonthDropDownButtonConstructor; _MonthDropDownButton: _MonthDropDownButtonConstructor; } declare const Calendar: CalendarConstructor; export = Calendar;