forked from jbaroudi/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gldatepicker.d.ts
69 lines (60 loc) · 1.82 KB
/
gldatepicker.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Type definitions for glDatePicker 2.0
// Project: http://glad.github.com/glDatePicker/
// Definitions by: Dániel Tar <https://github.com/qcz>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
interface GlDatePickerOffset {
x: number;
y: number;
}
interface GlDatePickerDate {
date: Date;
repeatMonth?: boolean;
repeatYear?: boolean;
}
interface GlDatePickerDateRange {
from: Date;
to?: Date;
repeatYear?: boolean;
}
interface GlDatePickerSpecialDate extends GlDatePickerDate {
data?: any;
cssClass?: string;
}
interface GlDatePickerOptions {
cssName?: string;
zIndex?: number;
borderSize?: number;
calendarOffset?: GlDatePickerOffset;
showAlways?: boolean;
hideOnClick?: boolean;
allowMonthSelect?: boolean;
allowYearSelect?: boolean;
todayDate?: Date;
selectedDate?: Date;
prevArrow?: string;
nextArrow?: string;
selectableDates?: GlDatePickerDate[];
selectableDateRange?: GlDatePickerDateRange[];
specialDates?: GlDatePickerSpecialDate[];
selectableMonths?: number[];
selectableYears?: number[];
selectableDOW?: number[];
monthNames?: string[];
dowNames?: string[];
dowOffset?: number;
onClick?: (inputElement: JQuery, cell: JQuery, date: Date, data: any) => void;
onHover?: (inputElement: JQuery, cell: JQuery, date: Date, data: any) => void;
onShow?: (calendar: JQuery) => void;
onHide?: (calendar: JQuery) => void;
}
interface GlDatePicker {
options: GlDatePickerOptions;
show(): void;
hide(): void;
render(renderCallback?: () => void): void;
}
interface JQuery {
glDatePicker(ret: boolean): GlDatePicker;
glDatePicker(options?: GlDatePickerOptions): JQuery;
}