1
- // Type definitions for FullCalendar 1.6.1
2
- // Project: http://arshaw.com/ fullcalendar/
1
+ // Type definitions for FullCalendar 2.7.2
2
+ // Project: http://fullcalendar.io /
3
3
// Definitions by: Neil Stalker <https://github.com/nestalk>, Marcelo Camargo <https://github.com/hasellcamargo>
4
4
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
5
8
8
9
9
declare namespace FullCalendar {
10
10
export interface Calendar {
11
-
12
- /**
13
- * Formats a Date object into a string.
14
- */
15
- formatDate ( date : Date , format : string , options ?: Options ) : string ;
16
-
17
- /**
18
- * Formats a date range (two Date objects) into a string.
19
- */
20
- formatDates ( date1 : Date , date2 : Date , format : string , options ?: Options ) : string ;
21
-
22
- /**
23
- * Parses a string into a Date object.
24
- */
25
- parseDate ( dateString : string , ignoreTimezone ?: boolean ) : Date ;
26
-
27
- /**
28
- * Parses an ISO8601 string into a Date object.
29
- */
30
- parseISO8601 ( dateString : string , ignoreTimezone ?: boolean ) : Date ;
31
-
32
11
/**
33
12
* Gets the version of Fullcalendar
34
13
*/
@@ -47,8 +26,7 @@ declare namespace FullCalendar {
47
26
}
48
27
49
28
export interface Options extends AgendaOptions , EventDraggingResizingOptions , DroppingExternalElementsOptions , SelectionOptions {
50
-
51
- // General display - http://arshaw.com/fullcalendar/docs/display/
29
+ // General display - http://fullcalendar.io/docs/display/
52
30
53
31
header ?: {
54
32
left : string ;
@@ -72,6 +50,7 @@ declare namespace FullCalendar {
72
50
contentHeight ?: number ;
73
51
aspectRatio ?: number ;
74
52
handleWindowResize ?: boolean ;
53
+ views ?: ViewSpecificOptions ;
75
54
viewRender ?: ( view : ViewObject , element : JQuery ) => void ;
76
55
viewDestroy ?: ( view : ViewObject , element : JQuery ) => void ;
77
56
dayRender ?: ( date : Date , cell : HTMLTableDataCellElement ) => void ;
@@ -81,22 +60,22 @@ declare namespace FullCalendar {
81
60
timezone ?: string | boolean ;
82
61
now ?: moment . Moment | Date | string | ( ( ) => moment . Moment )
83
62
84
- // Views - http://arshaw.com/ fullcalendar/docs/views/
63
+ // Views - http://fullcalendar.io /docs/views/
85
64
86
65
defaultView ?: string ;
87
66
88
- // Current Date - http://arshaw.com/ fullcalendar/docs/current_date/
67
+ // Current Date - http://fullcalendar.io /docs/current_date/
89
68
90
69
defaultDate ?: moment . Moment | Date | string ;
91
70
year ?: number ;
92
71
month ?: number ;
93
72
date ?: number ;
94
73
95
- // Text/Time Customization - http://arshaw.com/ fullcalendar/docs/text/
74
+ // Text/Time Customization - http://fullcalendar.io /docs/text/
96
75
97
- timeFormat ?: any ; // String/ViewOptionHash
98
- columnFormat ?: any ; // String/ViewOptionHash
99
- titleFormat ?: any ; // String/ViewOptionHash
76
+ timeFormat ?: any ; // String
77
+ columnFormat ?: any ; // String
78
+ titleFormat ?: any ; // String
100
79
101
80
buttonText ?: ButtonTextObject ;
102
81
monthNames ?: Array < string > ;
@@ -105,21 +84,21 @@ declare namespace FullCalendar {
105
84
dayNamesShort ?: Array < string > ;
106
85
weekNumberTitle ?: string ;
107
86
108
- // Clicking & Hovering - http://arshaw.com/ fullcalendar/docs/mouse/
87
+ // Clicking & Hovering - http://fullcalendar.io /docs/mouse/
109
88
110
89
dayClick ?: ( date : Date , allDay : boolean , jsEvent : MouseEvent , view : ViewObject ) => void ;
111
90
eventClick ?: ( event : EventObject , jsEvent : MouseEvent , view : ViewObject ) => any ; // return type boolean or void
112
91
eventMouseover ?: ( event : EventObject , jsEvent : MouseEvent , view : ViewObject ) => void ;
113
92
eventMouseout ?: ( event : EventObject , jsEvent : MouseEvent , view : ViewObject ) => void ;
114
93
115
- // Event Data - http://arshaw.com/ fullcalendar/docs/event_data/
94
+ // Event Data - http://fullcalendar.io /docs/event_data/
116
95
117
96
/**
118
97
* This has one of the following types:
119
98
*
120
99
* - EventObject[]
121
100
* - string (JSON feed)
122
- * - (start: Date | string, end: Date | string , callback: {(events: EventObject[]) => void;}) => void;
101
+ * - (start: moment.Moment, end: moment.Moment, timezone: string | boolean , callback: {(events: EventObject[]) => void;}) => void;
123
102
*/
124
103
events ?: any ;
125
104
@@ -129,19 +108,18 @@ declare namespace FullCalendar {
129
108
* - EventSource
130
109
* - EventObject[]
131
110
* - string (JSON feed)
132
- * - (start: Date | string, end: Date | string , callback: {(events: EventObject[]) => void;}) => void;
111
+ * - (start: moment.Moment, end: moment.Moment, timezone: string | boolean , callback: {(events: EventObject[]) => void;}) => void;
133
112
*/
134
113
eventSources ?: any [ ] ;
135
114
136
115
allDayDefault ?: boolean ;
137
- ignoreTimezone ?: boolean ;
138
116
startParam ?: string ;
139
117
endParam ?: string
140
118
lazyFetching ?: boolean ;
141
119
eventDataTransform ?: ( eventData : any ) => EventObject ;
142
120
loading ?: ( isLoading : boolean , view : ViewObject ) => void ;
143
121
144
- // Event Rendering - http://arshaw.com/ fullcalendar/docs/event_rendering/
122
+ // Event Rendering - http://fullcalendar.io /docs/event_rendering/
145
123
146
124
eventColor ?: string ;
147
125
eventBackgroundColor ?: string ;
@@ -151,25 +129,10 @@ declare namespace FullCalendar {
151
129
eventAfterRender ?: ( event : EventObject , element : HTMLDivElement , view : ViewObject ) => void ;
152
130
eventAfterAllRender ?: ( view : ViewObject ) => void ;
153
131
eventDestroy ?: ( event : EventObject , element : JQuery , view : ViewObject ) => void ;
154
-
155
-
156
- }
157
-
158
- export interface ViewOptionHash {
159
- month ?: any ;
160
- week ?: any ;
161
- day ?: any ;
162
- agenda ?: any ;
163
- agendaDay ?: any ;
164
- agendaWeek ?: any ;
165
- basic ?: any ;
166
- basicDay ?: any ;
167
- basicWeek ?: any ;
168
- '' ?: any ;
169
132
}
170
133
171
134
/**
172
- * Agenda Options - http://arshaw.com/ fullcalendar/docs/agenda/
135
+ * Agenda Options - http://fullcalendar.io /docs/agenda/
173
136
*/
174
137
export interface AgendaOptions {
175
138
allDaySlot ?: boolean ;
@@ -204,7 +167,7 @@ declare namespace FullCalendar {
204
167
eventResize ?: ( event : EventObject , delta : moment . Duration , revertFunc : Function , jsEvent : Event , ui : any , view : ViewObject ) => void ;
205
168
}
206
169
/*
207
- * Selection - http://arshaw.com/ fullcalendar/docs/selection/
170
+ * Selection - http://fullcalendar.io /docs/selection/
208
171
*/
209
172
export interface SelectionOptions {
210
173
selectable ?: boolean ;
@@ -258,13 +221,12 @@ declare namespace FullCalendar {
258
221
}
259
222
260
223
export interface EventSource extends JQueryAjaxSettings {
261
-
262
224
/**
263
225
* This has one of the following types:
264
226
*
265
227
* - EventObject[]
266
228
* - string (JSON feed)
267
- * - (start: Date | string, end: Date | string , callback: {(events: EventObject[]) => void;}) => void;
229
+ * - (start: moment.Moment, end: moment.Moment, timezone: string | boolean , callback: {(events: EventObject[]) => void;}) => void;
268
230
*/
269
231
events ?: any ;
270
232
@@ -281,10 +243,23 @@ declare namespace FullCalendar {
281
243
endParam ?: string
282
244
}
283
245
246
+ /*
247
+ * View Specific Options - http://fullcalendar.io/docs/views/View-Specific-Options/
248
+ */
249
+ export interface ViewSpecificOptions {
250
+ basic ?: Options ;
251
+ agenda ?: Options ;
252
+ week ?: Options ;
253
+ day ?: Options ;
254
+ month ?: Options ;
255
+ basicWeek ?: Options ;
256
+ basicDay ?: Options ;
257
+ agendaWeek ?: Options ;
258
+ agendaDay ?: Options ;
259
+ }
284
260
}
285
261
286
262
interface JQuery {
287
-
288
263
/**
289
264
* Get/Set option value
290
265
*/
@@ -428,4 +403,4 @@ interface JQuery {
428
403
429
404
interface JQueryStatic {
430
405
fullCalendar : FullCalendar . Calendar ;
431
- }
406
+ }
0 commit comments