@syncfusion/ej2-calendars 30.2.4 → 31.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-calendars.min.js +1 -1
- package/dist/ej2-calendars.umd.min.js +1 -1
- package/dist/global/ej2-calendars.min.js +1 -1
- package/dist/global/index.d.ts +1 -1
- package/dist/ts/calendar/calendar-model.d.ts +340 -0
- package/dist/ts/calendar/calendar.d.ts +733 -0
- package/dist/ts/calendar/calendar.ts +3009 -0
- package/dist/ts/calendar/index.d.ts +6 -0
- package/dist/ts/calendar/index.ts +6 -0
- package/dist/ts/calendar/islamic.d.ts +28 -0
- package/dist/ts/calendar/islamic.ts +597 -0
- package/dist/ts/common/index.d.ts +5 -0
- package/dist/ts/common/index.ts +5 -0
- package/dist/ts/common/maskplaceholder-model.d.ts +57 -0
- package/dist/ts/common/maskplaceholder.d.ts +45 -0
- package/dist/ts/common/maskplaceholder.ts +54 -0
- package/dist/ts/datepicker/datepicker-model.d.ts +364 -0
- package/dist/ts/datepicker/datepicker.d.ts +583 -0
- package/dist/ts/datepicker/datepicker.ts +2528 -0
- package/dist/ts/datepicker/index.d.ts +5 -0
- package/dist/ts/datepicker/index.ts +5 -0
- package/dist/ts/daterangepicker/daterangepicker-model.d.ts +496 -0
- package/dist/ts/daterangepicker/daterangepicker.d.ts +857 -0
- package/dist/ts/daterangepicker/daterangepicker.ts +5096 -0
- package/dist/ts/daterangepicker/index.d.ts +5 -0
- package/dist/ts/daterangepicker/index.ts +5 -0
- package/dist/ts/datetimepicker/datetimepicker-model.d.ts +479 -0
- package/dist/ts/datetimepicker/datetimepicker.d.ts +626 -0
- package/dist/ts/datetimepicker/datetimepicker.ts +2212 -0
- package/dist/ts/datetimepicker/index.d.ts +5 -0
- package/dist/ts/datetimepicker/index.ts +5 -0
- package/dist/ts/index.d.ts +9 -0
- package/dist/ts/index.ts +9 -0
- package/dist/ts/maskbase/index.d.ts +5 -0
- package/dist/ts/maskbase/index.ts +5 -0
- package/dist/ts/maskbase/interface.d.ts +28 -0
- package/dist/ts/maskbase/interface.ts +29 -0
- package/dist/ts/maskbase/masked-date-time.d.ts +77 -0
- package/dist/ts/maskbase/masked-date-time.ts +1013 -0
- package/dist/ts/timepicker/index.d.ts +5 -0
- package/dist/ts/timepicker/index.ts +5 -0
- package/dist/ts/timepicker/timepicker-model.d.ts +393 -0
- package/dist/ts/timepicker/timepicker.d.ts +681 -0
- package/dist/ts/timepicker/timepicker.ts +2944 -0
- package/package.json +59 -16
- package/aceconfig.js +0 -17
|
@@ -0,0 +1,733 @@
|
|
|
1
|
+
import { Component, Internationalization, ModuleDeclaration } from '@syncfusion/ej2-base';
|
|
2
|
+
import { INotifyPropertyChanged, KeyboardEvents, L10n, SwipeEventArgs } from '@syncfusion/ej2-base';
|
|
3
|
+
import { KeyboardEventArgs, BaseEventArgs } from '@syncfusion/ej2-base';
|
|
4
|
+
import { EmitType } from '@syncfusion/ej2-base';
|
|
5
|
+
import { CalendarModel, CalendarBaseModel } from './calendar-model';
|
|
6
|
+
import { Islamic } from './index';
|
|
7
|
+
/**
|
|
8
|
+
* Specifies the view of the calendar.
|
|
9
|
+
*/
|
|
10
|
+
export declare type CalendarView = 'Month' | 'Year' | 'Decade';
|
|
11
|
+
export declare type CalendarType = 'Islamic' | 'Gregorian';
|
|
12
|
+
export declare type DayHeaderFormats = 'Short' | 'Narrow' | 'Abbreviated' | 'Wide';
|
|
13
|
+
/**
|
|
14
|
+
* Specifies the rule for defining the first week of the year.
|
|
15
|
+
*/
|
|
16
|
+
export declare type WeekRule = 'FirstDay' | 'FirstFullWeek' | 'FirstFourDayWeek';
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
export declare class CalendarBase extends Component<HTMLElement> implements INotifyPropertyChanged {
|
|
22
|
+
protected headerElement: HTMLElement;
|
|
23
|
+
protected contentElement: HTMLElement;
|
|
24
|
+
private calendarEleCopy;
|
|
25
|
+
protected table: HTMLElement;
|
|
26
|
+
protected tableHeadElement: HTMLElement;
|
|
27
|
+
protected tableBodyElement: Element;
|
|
28
|
+
protected nextIcon: HTMLElement;
|
|
29
|
+
protected previousIcon: HTMLElement;
|
|
30
|
+
protected headerTitleElement: HTMLElement;
|
|
31
|
+
protected todayElement: HTMLElement;
|
|
32
|
+
protected footer: HTMLElement;
|
|
33
|
+
protected keyboardModule: KeyboardEvents;
|
|
34
|
+
protected globalize: Internationalization;
|
|
35
|
+
islamicModule: Islamic;
|
|
36
|
+
protected currentDate: Date;
|
|
37
|
+
protected navigatedArgs: NavigatedEventArgs;
|
|
38
|
+
protected renderDayCellArgs: RenderDayCellEventArgs;
|
|
39
|
+
protected effect: string;
|
|
40
|
+
protected previousDate: Date;
|
|
41
|
+
protected previousValues: number;
|
|
42
|
+
protected navigateHandler: Function;
|
|
43
|
+
protected navigatePreviousHandler: Function;
|
|
44
|
+
protected navigateNextHandler: Function;
|
|
45
|
+
protected l10: L10n;
|
|
46
|
+
protected todayDisabled: boolean;
|
|
47
|
+
protected nextIconClicked: boolean;
|
|
48
|
+
protected previousIconClicked: boolean;
|
|
49
|
+
protected tabIndex: string;
|
|
50
|
+
protected todayDate: Date;
|
|
51
|
+
protected islamicPreviousHeader: string;
|
|
52
|
+
protected calendarElement: HTMLElement;
|
|
53
|
+
protected isPopupClicked: boolean;
|
|
54
|
+
protected isDateSelected: boolean;
|
|
55
|
+
private serverModuleName;
|
|
56
|
+
protected timezone: string;
|
|
57
|
+
protected defaultKeyConfigs: {
|
|
58
|
+
[key: string]: string;
|
|
59
|
+
};
|
|
60
|
+
protected previousDateTime: Date;
|
|
61
|
+
protected isTodayClicked: boolean;
|
|
62
|
+
protected todayButtonEvent: MouseEvent | KeyboardEvent;
|
|
63
|
+
protected preventChange: boolean;
|
|
64
|
+
protected previousDates: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Gets or sets the minimum date that can be selected in the Calendar.
|
|
67
|
+
*
|
|
68
|
+
* @default new Date(1900, 00, 01)
|
|
69
|
+
* @deprecated
|
|
70
|
+
*/
|
|
71
|
+
min: Date;
|
|
72
|
+
/**
|
|
73
|
+
* Specifies the component to be disabled or not.
|
|
74
|
+
*
|
|
75
|
+
* @default true
|
|
76
|
+
*/
|
|
77
|
+
enabled: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Specifies the root CSS class of the Calendar that allows to
|
|
80
|
+
* customize the appearance by overriding the styles.
|
|
81
|
+
*
|
|
82
|
+
* @default null
|
|
83
|
+
*/
|
|
84
|
+
cssClass: string;
|
|
85
|
+
/**
|
|
86
|
+
* Gets or sets the maximum date that can be selected in the Calendar.
|
|
87
|
+
*
|
|
88
|
+
* @default new Date(2099, 11, 31)
|
|
89
|
+
* @deprecated
|
|
90
|
+
*/
|
|
91
|
+
max: Date;
|
|
92
|
+
/**
|
|
93
|
+
* Gets or sets the Calendar's first day of the week. By default, the first day of the week will be based on the current culture.
|
|
94
|
+
*
|
|
95
|
+
* @default 0
|
|
96
|
+
* @aspType int
|
|
97
|
+
* @deprecated
|
|
98
|
+
* > For more details about firstDayOfWeek refer to
|
|
99
|
+
* [`First day of week`](../../calendar/how-to/first-day-of-week#change-the-first-day-of-the-week) documentation.
|
|
100
|
+
*/
|
|
101
|
+
firstDayOfWeek: number;
|
|
102
|
+
/**
|
|
103
|
+
* Gets or sets the Calendar's Type like gregorian or islamic.
|
|
104
|
+
*
|
|
105
|
+
* @default Gregorian
|
|
106
|
+
* @deprecated
|
|
107
|
+
*/
|
|
108
|
+
calendarMode: CalendarType;
|
|
109
|
+
/**
|
|
110
|
+
* Specifies the initial view of the Calendar when it is opened.
|
|
111
|
+
* With the help of this property, initial view can be changed to year or decade view.
|
|
112
|
+
*
|
|
113
|
+
* @default Month
|
|
114
|
+
* @deprecated
|
|
115
|
+
*
|
|
116
|
+
* <table>
|
|
117
|
+
* <tr>
|
|
118
|
+
* <td colSpan=1 rowSpan=1>
|
|
119
|
+
* View<br/></td><td colSpan=1 rowSpan=1>
|
|
120
|
+
* Description<br/></td></tr>
|
|
121
|
+
* <tr>
|
|
122
|
+
* <td colSpan=1 rowSpan=1>
|
|
123
|
+
* Month<br/></td><td colSpan=1 rowSpan=1>
|
|
124
|
+
* Calendar view shows the days of the month.<br/></td></tr>
|
|
125
|
+
* <tr>
|
|
126
|
+
* <td colSpan=1 rowSpan=1>
|
|
127
|
+
* Year<br/></td><td colSpan=1 rowSpan=1>
|
|
128
|
+
* Calendar view shows the months of the year.<br/></td></tr>
|
|
129
|
+
* <tr>
|
|
130
|
+
* <td colSpan=1 rowSpan=1>
|
|
131
|
+
* Decade<br/></td><td colSpan=1 rowSpan=1>
|
|
132
|
+
* Calendar view shows the years of the decade.<br/></td></tr>
|
|
133
|
+
* </table>
|
|
134
|
+
*
|
|
135
|
+
* > For more details about start refer to
|
|
136
|
+
* [`calendarView`](../../calendar/calendar-views#view-restriction)documentation.
|
|
137
|
+
*/
|
|
138
|
+
start: CalendarView;
|
|
139
|
+
/**
|
|
140
|
+
* Sets the maximum level of view such as month, year, and decade in the Calendar.
|
|
141
|
+
* Depth view should be smaller than the start view to restrict its view navigation.
|
|
142
|
+
*
|
|
143
|
+
* @default Month
|
|
144
|
+
* @deprecated
|
|
145
|
+
*
|
|
146
|
+
* <table>
|
|
147
|
+
* <tr>
|
|
148
|
+
* <td colSpan=1 rowSpan=1>
|
|
149
|
+
* view<br/></td><td colSpan=1 rowSpan=1>
|
|
150
|
+
* Description<br/></td></tr>
|
|
151
|
+
* <tr>
|
|
152
|
+
* <td colSpan=1 rowSpan=1>
|
|
153
|
+
* Month<br/></td><td colSpan=1 rowSpan=1>
|
|
154
|
+
* Calendar view shows up to the days of the month.<br/></td></tr>
|
|
155
|
+
* <tr>
|
|
156
|
+
* <td colSpan=1 rowSpan=1>
|
|
157
|
+
* Year<br/></td><td colSpan=1 rowSpan=1>
|
|
158
|
+
* Calendar view shows up to the months of the year.<br/></td></tr>
|
|
159
|
+
* <tr>
|
|
160
|
+
* <td colSpan=1 rowSpan=1>
|
|
161
|
+
* Decade<br/></td><td colSpan=1 rowSpan=1>
|
|
162
|
+
* Calendar view shows up to the years of the decade.<br/></td></tr>
|
|
163
|
+
* </table>
|
|
164
|
+
*
|
|
165
|
+
* > For more details about depth refer to
|
|
166
|
+
* [`calendarView`](../../calendar/calendar-views#view-restriction)documentation.
|
|
167
|
+
*/
|
|
168
|
+
depth: CalendarView;
|
|
169
|
+
/**
|
|
170
|
+
* Determines whether the week number of the year is to be displayed in the calendar or not.
|
|
171
|
+
*
|
|
172
|
+
* @default false
|
|
173
|
+
* @deprecated
|
|
174
|
+
* > For more details about weekNumber refer to
|
|
175
|
+
* [`Calendar with week number`](../../calendar/how-to/render-the-calendar-with-week-numbers)documentation.
|
|
176
|
+
*/
|
|
177
|
+
weekNumber: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Specifies the rule for defining the first week of the year.
|
|
180
|
+
*
|
|
181
|
+
* @default FirstDay
|
|
182
|
+
*/
|
|
183
|
+
weekRule: WeekRule;
|
|
184
|
+
/**
|
|
185
|
+
* Specifies whether the today button is to be displayed or not.
|
|
186
|
+
*
|
|
187
|
+
* @default true
|
|
188
|
+
* @deprecated
|
|
189
|
+
*/
|
|
190
|
+
showTodayButton: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* Specifies the format of the day that to be displayed in header. By default, the format is ‘short’.
|
|
193
|
+
* Possible formats are:
|
|
194
|
+
* * `Short` - Sets the short format of day name (like Su ) in day header.
|
|
195
|
+
* * `Narrow` - Sets the single character of day name (like S ) in day header.
|
|
196
|
+
* * `Abbreviated` - Sets the min format of day name (like Sun ) in day header.
|
|
197
|
+
* * `Wide` - Sets the long format of day name (like Sunday ) in day header.
|
|
198
|
+
*
|
|
199
|
+
* @default Short
|
|
200
|
+
* @deprecated
|
|
201
|
+
*/
|
|
202
|
+
dayHeaderFormat: DayHeaderFormats;
|
|
203
|
+
/**
|
|
204
|
+
* Enable or disable persisting component's state between page reloads. If enabled, following list of states will be persisted.
|
|
205
|
+
* 1. value
|
|
206
|
+
*
|
|
207
|
+
* @default false
|
|
208
|
+
* @deprecated
|
|
209
|
+
*/
|
|
210
|
+
enablePersistence: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Customizes the key actions in Calendar.
|
|
213
|
+
* For example, when using German keyboard, the key actions can be customized using these shortcuts.
|
|
214
|
+
*
|
|
215
|
+
* <table>
|
|
216
|
+
* <tr>
|
|
217
|
+
* <td colSpan=1 rowSpan=1>
|
|
218
|
+
* Key action<br/></td><td colSpan=1 rowSpan=1>
|
|
219
|
+
* Key<br/></td></tr>
|
|
220
|
+
* <tr>
|
|
221
|
+
* <td colSpan=1 rowSpan=1>
|
|
222
|
+
* controlUp<br/></td><td colSpan=1 rowSpan=1>
|
|
223
|
+
* ctrl+38<br/></td></tr>
|
|
224
|
+
* <tr>
|
|
225
|
+
* <td colSpan=1 rowSpan=1>
|
|
226
|
+
* controlDown<br/></td><td colSpan=1 rowSpan=1>
|
|
227
|
+
* ctrl+40<br/></td></tr>
|
|
228
|
+
* <tr>
|
|
229
|
+
* <td colSpan=1 rowSpan=1>
|
|
230
|
+
* select<br/></td><td colSpan=1 rowSpan=1>
|
|
231
|
+
* enter<br/></td></tr>
|
|
232
|
+
* <tr>
|
|
233
|
+
* <td colSpan=1 rowSpan=1>
|
|
234
|
+
* home<br/></td><td colSpan=1 rowSpan=1>
|
|
235
|
+
* home<br/></td></tr>
|
|
236
|
+
* <tr>
|
|
237
|
+
* <td colSpan=1 rowSpan=1>
|
|
238
|
+
* end<br/></td><td colSpan=1 rowSpan=1>
|
|
239
|
+
* end<br/></td></tr>
|
|
240
|
+
* <tr>
|
|
241
|
+
* <td colSpan=1 rowSpan=1>
|
|
242
|
+
* pageUp<br/></td><td colSpan=1 rowSpan=1>
|
|
243
|
+
* pageup<br/></td></tr>
|
|
244
|
+
* <tr>
|
|
245
|
+
* <td colSpan=1 rowSpan=1>
|
|
246
|
+
* pageDown<br/></td><td colSpan=1 rowSpan=1>
|
|
247
|
+
* pagedown<br/></td></tr>
|
|
248
|
+
* <tr>
|
|
249
|
+
* <td colSpan=1 rowSpan=1>
|
|
250
|
+
* shiftPageUp<br/></td><td colSpan=1 rowSpan=1>
|
|
251
|
+
* shift+pageup<br/></td></tr>
|
|
252
|
+
* <tr>
|
|
253
|
+
* <td colSpan=1 rowSpan=1>
|
|
254
|
+
* shiftPageDown<br/></td><td colSpan=1 rowSpan=1>
|
|
255
|
+
* shift+pagedown<br/></td></tr>
|
|
256
|
+
* <tr>
|
|
257
|
+
* <td colSpan=1 rowSpan=1>
|
|
258
|
+
* controlHome<br/></td><td colSpan=1 rowSpan=1>
|
|
259
|
+
* ctrl+home<br/></td></tr>
|
|
260
|
+
* <tr>
|
|
261
|
+
* <td colSpan=1 rowSpan=1>
|
|
262
|
+
* controlEnd<br/></td><td colSpan=1 rowSpan=1>
|
|
263
|
+
* ctrl+end<br/></td></tr>
|
|
264
|
+
* <tr>
|
|
265
|
+
* <td colSpan=1 rowSpan=1>
|
|
266
|
+
* altUpArrow<br/></td><td colSpan=1 rowSpan=1>
|
|
267
|
+
* alt+uparrow<br/></td></tr>
|
|
268
|
+
* <tr>
|
|
269
|
+
* <td colSpan=1 rowSpan=1>
|
|
270
|
+
* spacebar<br/></td><td colSpan=1 rowSpan=1>
|
|
271
|
+
* space<br/></td></tr>
|
|
272
|
+
* <tr>
|
|
273
|
+
* <td colSpan=1 rowSpan=1>
|
|
274
|
+
* altRightArrow<br/></td><td colSpan=1 rowSpan=1>
|
|
275
|
+
* alt+rightarrow<br/></td></tr>
|
|
276
|
+
* <tr>
|
|
277
|
+
* <td colSpan=1 rowSpan=1>
|
|
278
|
+
* altLeftArrow<br/></td><td colSpan=1 rowSpan=1>
|
|
279
|
+
* alt+leftarrow<br/></td></tr>
|
|
280
|
+
* <tr>
|
|
281
|
+
* <td colSpan=1 rowSpan=1>
|
|
282
|
+
* moveDown<br/></td><td colSpan=1 rowSpan=1>
|
|
283
|
+
* downarrow<br/></td></tr>
|
|
284
|
+
* <tr>
|
|
285
|
+
* <td colSpan=1 rowSpan=1>
|
|
286
|
+
* moveUp<br/></td><td colSpan=1 rowSpan=1>
|
|
287
|
+
* uparrow<br/></td></tr>
|
|
288
|
+
* <tr>
|
|
289
|
+
* <td colSpan=1 rowSpan=1>
|
|
290
|
+
* moveLeft<br/></td><td colSpan=1 rowSpan=1>
|
|
291
|
+
* leftarrow<br/></td></tr>
|
|
292
|
+
* <tr>
|
|
293
|
+
* <td colSpan=1 rowSpan=1>
|
|
294
|
+
* moveRight<br/></td><td colSpan=1 rowSpan=1>
|
|
295
|
+
* rightarrow<br/></td></tr>
|
|
296
|
+
* </table>
|
|
297
|
+
*
|
|
298
|
+
* {% codeBlock src='calendar/keyConfigs/index.md' %}{% endcodeBlock %}
|
|
299
|
+
*
|
|
300
|
+
* @default null
|
|
301
|
+
* @deprecated
|
|
302
|
+
*/
|
|
303
|
+
keyConfigs: {
|
|
304
|
+
[key: string]: string;
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* By default, the date value will be processed based on system time zone.
|
|
308
|
+
* If you want to process the initial date value using server time zone
|
|
309
|
+
* then specify the time zone value to `serverTimezoneOffset` property.
|
|
310
|
+
*
|
|
311
|
+
* @default null
|
|
312
|
+
* @deprecated
|
|
313
|
+
*/
|
|
314
|
+
serverTimezoneOffset: number;
|
|
315
|
+
/**
|
|
316
|
+
* Triggers when Calendar is created.
|
|
317
|
+
*
|
|
318
|
+
* @event created
|
|
319
|
+
*/
|
|
320
|
+
created: EmitType<Object>;
|
|
321
|
+
/**
|
|
322
|
+
* Triggers when Calendar is destroyed.
|
|
323
|
+
*
|
|
324
|
+
* @event destroyed
|
|
325
|
+
*/
|
|
326
|
+
destroyed: EmitType<Object>;
|
|
327
|
+
/**
|
|
328
|
+
* Triggers when the Calendar is navigated to another level or within the same level of view.
|
|
329
|
+
*
|
|
330
|
+
* @event navigated
|
|
331
|
+
*/
|
|
332
|
+
navigated: EmitType<NavigatedEventArgs>;
|
|
333
|
+
/**
|
|
334
|
+
* Triggers when each day cell of the Calendar is rendered.
|
|
335
|
+
*
|
|
336
|
+
* @event renderDayCell
|
|
337
|
+
*/
|
|
338
|
+
renderDayCell: EmitType<RenderDayCellEventArgs>;
|
|
339
|
+
/**
|
|
340
|
+
* Initialized new instance of Calendar Class.
|
|
341
|
+
* Constructor for creating the widget
|
|
342
|
+
*
|
|
343
|
+
* @param {CalendarBaseModel} options - Specifies the CalendarBase model.
|
|
344
|
+
* @param {string | HTMLElement} element - Specifies the element to render as component.
|
|
345
|
+
* @private
|
|
346
|
+
*/
|
|
347
|
+
constructor(options?: CalendarBaseModel, element?: string | HTMLElement);
|
|
348
|
+
/**
|
|
349
|
+
* To Initialize the control rendering.
|
|
350
|
+
*
|
|
351
|
+
* @returns {void}
|
|
352
|
+
* @private
|
|
353
|
+
*/
|
|
354
|
+
protected render(): void;
|
|
355
|
+
protected rangeValidation(min: Date, max: Date): void;
|
|
356
|
+
protected getDefaultKeyConfig(): {
|
|
357
|
+
[key: string]: string;
|
|
358
|
+
};
|
|
359
|
+
protected validateDate(value?: Date): void;
|
|
360
|
+
protected setOverlayIndex(popupWrapper: HTMLElement, popupElement: HTMLElement, modal: HTMLElement, isDevice: boolean): void;
|
|
361
|
+
protected minMaxUpdate(value?: Date): void;
|
|
362
|
+
protected createHeader(): void;
|
|
363
|
+
protected createContent(): void;
|
|
364
|
+
private addContentFocus;
|
|
365
|
+
private removeContentFocus;
|
|
366
|
+
protected getCultureValues(): string[];
|
|
367
|
+
protected toCapitalize(text: string): string;
|
|
368
|
+
protected createContentHeader(): void;
|
|
369
|
+
protected createContentBody(): void;
|
|
370
|
+
protected updateFooter(): void;
|
|
371
|
+
protected createContentFooter(): void;
|
|
372
|
+
protected wireEvents(id?: string, ref?: object, keyConfig?: {
|
|
373
|
+
[key: string]: string;
|
|
374
|
+
}, moduleName?: string): void;
|
|
375
|
+
protected dateWireEvents(id?: string, ref?: object, keyConfig?: {
|
|
376
|
+
[key: string]: string;
|
|
377
|
+
}, moduleName?: string): void;
|
|
378
|
+
protected todayButtonClick(e?: MouseEvent | KeyboardEvent, value?: Date, isCustomDate?: boolean): void;
|
|
379
|
+
protected resetCalendar(): void;
|
|
380
|
+
protected keyActionHandle(e: KeyboardEventArgs, value?: Date, multiSelection?: boolean): void;
|
|
381
|
+
protected keyboardNavigate(number: number, currentView: number, e: KeyboardEvent, max: Date, min: Date): void;
|
|
382
|
+
/**
|
|
383
|
+
* Initialize the event handler
|
|
384
|
+
*
|
|
385
|
+
* @param {Date} value - Specifies value of date.
|
|
386
|
+
* @returns {void}
|
|
387
|
+
* @private
|
|
388
|
+
*/
|
|
389
|
+
protected preRender(value?: Date): void;
|
|
390
|
+
protected minMaxDate(localDate: Date): Date;
|
|
391
|
+
protected renderMonths(e?: Event, value?: Date, isCustomDate?: boolean): void;
|
|
392
|
+
protected renderDays(currentDate: Date, value?: Date, multiSelection?: boolean, values?: Date[], isTodayDate?: boolean, e?: Event): HTMLElement[];
|
|
393
|
+
protected updateFocus(otherMonth: boolean, disabled: boolean, localDate: Date, tableElement: HTMLElement, currentDate: Date): void;
|
|
394
|
+
protected renderYears(e?: Event, value?: Date): void;
|
|
395
|
+
protected renderDecades(e?: Event, value?: Date): void;
|
|
396
|
+
protected dayCell(localDate: Date): HTMLElement;
|
|
397
|
+
protected firstDay(date: Date): Date;
|
|
398
|
+
protected lastDay(date: Date, view: number): Date;
|
|
399
|
+
protected checkDateValue(value: Date): Date;
|
|
400
|
+
protected findLastDay(date: Date): Date;
|
|
401
|
+
protected removeTableHeadElement(): void;
|
|
402
|
+
protected renderTemplate(elements: HTMLElement[], count: number, classNm: string, e?: Event, value?: Date): void;
|
|
403
|
+
protected clickHandler(e: MouseEvent, value: Date): void;
|
|
404
|
+
protected clickEventEmitter(e: MouseEvent): void;
|
|
405
|
+
protected contentClick(e?: MouseEvent, view?: number, element?: Element, value?: Date): void;
|
|
406
|
+
protected switchView(view: number, e?: Event, multiSelection?: boolean, isCustomDate?: boolean): void;
|
|
407
|
+
/**
|
|
408
|
+
* To get component name
|
|
409
|
+
*
|
|
410
|
+
* @returns {string} Returns the component name.
|
|
411
|
+
* @private
|
|
412
|
+
*/
|
|
413
|
+
protected getModuleName(): string;
|
|
414
|
+
/**
|
|
415
|
+
*
|
|
416
|
+
* @returns {void}
|
|
417
|
+
* @deprecated
|
|
418
|
+
*/
|
|
419
|
+
requiredModules(): ModuleDeclaration[];
|
|
420
|
+
/**
|
|
421
|
+
* Gets the properties to be maintained upon browser refresh.
|
|
422
|
+
*
|
|
423
|
+
* @returns {string}
|
|
424
|
+
*/
|
|
425
|
+
getPersistData(): string;
|
|
426
|
+
/**
|
|
427
|
+
* Called internally if any of the property value changed.
|
|
428
|
+
*
|
|
429
|
+
* @param {CalendarBaseModel} newProp - Returns the dynamic property value of the component.
|
|
430
|
+
* @param {CalendarBaseModel} oldProp - Returns the previous property value of the component.
|
|
431
|
+
* @param {boolean} multiSelection - - Specifies whether multiple date selection is enabled or not.
|
|
432
|
+
* @param {Date[]} values - Specifies the dates.
|
|
433
|
+
* @returns {void}
|
|
434
|
+
* @private
|
|
435
|
+
*/
|
|
436
|
+
onPropertyChanged(newProp: CalendarBaseModel, oldProp: CalendarBaseModel, multiSelection?: boolean, values?: Date[]): void;
|
|
437
|
+
/**
|
|
438
|
+
* values property updated with considered disabled dates of the calendar.
|
|
439
|
+
*
|
|
440
|
+
* @param {boolean} multiSelection - Specifies whether multiple date selection is enabled.
|
|
441
|
+
* @param {Date[]} values - Specifies the dates to validate.
|
|
442
|
+
* @returns {void}
|
|
443
|
+
*/
|
|
444
|
+
protected validateValues(multiSelection?: boolean, values?: Date[]): void;
|
|
445
|
+
protected setValueUpdate(): void;
|
|
446
|
+
protected copyValues(values: Date[]): Date[];
|
|
447
|
+
protected titleUpdate(date: Date, view: string): void;
|
|
448
|
+
protected setActiveDescendant(): string;
|
|
449
|
+
protected iconHandler(): void;
|
|
450
|
+
/**
|
|
451
|
+
* Destroys the widget.
|
|
452
|
+
*
|
|
453
|
+
* @returns {void}
|
|
454
|
+
*/
|
|
455
|
+
destroy(): void;
|
|
456
|
+
protected title(e?: Event): void;
|
|
457
|
+
protected getViewNumber(stringVal: string): number;
|
|
458
|
+
protected navigateTitle(e?: Event): void;
|
|
459
|
+
protected previous(): void;
|
|
460
|
+
protected navigatePrevious(e: MouseEvent | KeyboardEvent | SwipeEventArgs): void;
|
|
461
|
+
protected next(): void;
|
|
462
|
+
protected navigateNext(eve: MouseEvent | KeyboardEvent | SwipeEventArgs): void;
|
|
463
|
+
/**
|
|
464
|
+
* This method is used to navigate to the month/year/decade view of the Calendar.
|
|
465
|
+
*
|
|
466
|
+
* @param {string} view - Specifies the view of the Calendar.
|
|
467
|
+
* @param {Date} date - Specifies the focused date in a view.
|
|
468
|
+
* @param {boolean} isCustomDate - Specifies whether the calendar is rendered with custom today date or not.
|
|
469
|
+
* @returns {void}
|
|
470
|
+
*/
|
|
471
|
+
navigateTo(view: CalendarView, date: Date, isCustomDate?: boolean): void;
|
|
472
|
+
/**
|
|
473
|
+
* Gets the current view of the Calendar.
|
|
474
|
+
*
|
|
475
|
+
* @returns {string}
|
|
476
|
+
*/
|
|
477
|
+
currentView(): string;
|
|
478
|
+
protected getDateVal(date: Date, value: Date): boolean;
|
|
479
|
+
protected getCultureObjects(ld: Object, c: string): Object;
|
|
480
|
+
protected getWeek(d: Date): number;
|
|
481
|
+
protected setStartDate(date: Date, time: number): void;
|
|
482
|
+
protected addMonths(date: Date, i: number): void;
|
|
483
|
+
protected addYears(date: Date, i: number): void;
|
|
484
|
+
protected getIdValue(e: MouseEvent | TouchEvent | KeyboardEvent, element: Element): Date;
|
|
485
|
+
protected adjustLongHeaderSize(): void;
|
|
486
|
+
protected selectDate(e: MouseEvent | KeyboardEventArgs, date: Date, node: Element, multiSelection?: boolean, values?: Date[]): void;
|
|
487
|
+
protected checkPresentDate(dates: Date, values: Date[]): boolean;
|
|
488
|
+
protected setAriaActiveDescendant(): void;
|
|
489
|
+
protected previousIconHandler(disabled: boolean): void;
|
|
490
|
+
protected renderDayCellEvent(args: RenderDayCellEventArgs): void;
|
|
491
|
+
protected navigatedEvent(eve: MouseEvent | KeyboardEvent | SwipeEventArgs): void;
|
|
492
|
+
protected triggerNavigate(event: MouseEvent | KeyboardEvent | SwipeEventArgs): void;
|
|
493
|
+
protected nextIconHandler(disabled: boolean): void;
|
|
494
|
+
protected compare(startDate: Date, endDate: Date, modifier: number): number;
|
|
495
|
+
protected isMinMaxRange(date: Date): boolean;
|
|
496
|
+
protected isMonthYearRange(date: Date): boolean;
|
|
497
|
+
protected compareYear(start: Date, end: Date): number;
|
|
498
|
+
protected compareDecade(start: Date, end: Date): number;
|
|
499
|
+
protected shiftArray(array: string[], i: number): string[];
|
|
500
|
+
protected addDay(date: Date, i: number, e: KeyboardEvent, max: Date, min: Date): void;
|
|
501
|
+
protected findNextTD(date: Date, column: number, max: Date, min: Date): boolean;
|
|
502
|
+
protected getMaxDays(d: Date): number;
|
|
503
|
+
protected setDateDecade(date: Date, year: number): void;
|
|
504
|
+
protected setDateYear(date: Date, value: Date): void;
|
|
505
|
+
protected compareMonth(start: Date, end: Date): number;
|
|
506
|
+
protected checkValue(inValue: string | Date | number): string;
|
|
507
|
+
protected checkView(): void;
|
|
508
|
+
protected getDate(date: Date, timezone: string): Date;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Represents the Calendar component that allows the user to select a date.
|
|
512
|
+
* ```html
|
|
513
|
+
* <div id="calendar"/>
|
|
514
|
+
* ```
|
|
515
|
+
* ```typescript
|
|
516
|
+
* <script>
|
|
517
|
+
* var calendarObj = new Calendar({ value: new Date() });
|
|
518
|
+
* calendarObj.appendTo("#calendar");
|
|
519
|
+
* </script>
|
|
520
|
+
* ```
|
|
521
|
+
*/
|
|
522
|
+
export declare class Calendar extends CalendarBase {
|
|
523
|
+
protected changedArgs: ChangedEventArgs;
|
|
524
|
+
protected changeHandler: Function;
|
|
525
|
+
/**
|
|
526
|
+
* Gets or sets the selected date of the Calendar.
|
|
527
|
+
*
|
|
528
|
+
* @default null
|
|
529
|
+
* @isGenericType true
|
|
530
|
+
* @deprecated
|
|
531
|
+
*/
|
|
532
|
+
value: Date;
|
|
533
|
+
/**
|
|
534
|
+
* Gets or sets multiple selected dates of the calendar.
|
|
535
|
+
* {% codeBlock src='calendar/values/index.md' %}{% endcodeBlock %}
|
|
536
|
+
*
|
|
537
|
+
* @default null
|
|
538
|
+
*/
|
|
539
|
+
values: Date[];
|
|
540
|
+
/**
|
|
541
|
+
* Specifies the option to enable the multiple dates selection of the calendar.
|
|
542
|
+
*
|
|
543
|
+
* @default false
|
|
544
|
+
*/
|
|
545
|
+
isMultiSelection: boolean;
|
|
546
|
+
/**
|
|
547
|
+
* Triggers when the Calendar value is changed.
|
|
548
|
+
*
|
|
549
|
+
* @event change
|
|
550
|
+
*/
|
|
551
|
+
change: EmitType<ChangedEventArgs>;
|
|
552
|
+
/**
|
|
553
|
+
* Initialized new instance of Calendar Class.
|
|
554
|
+
* Constructor for creating the widget
|
|
555
|
+
*
|
|
556
|
+
* @param {CalendarModel} options - Specifies the Calendar model.
|
|
557
|
+
* @param {string | HTMLElement} element - Specifies the element to render as component.
|
|
558
|
+
* @private
|
|
559
|
+
*/
|
|
560
|
+
constructor(options?: CalendarModel, element?: string | HTMLElement);
|
|
561
|
+
/**
|
|
562
|
+
* To Initialize the control rendering.
|
|
563
|
+
*
|
|
564
|
+
* @returns {void}
|
|
565
|
+
* @private
|
|
566
|
+
*/
|
|
567
|
+
protected render(): void;
|
|
568
|
+
protected setEnable(enable: boolean): void;
|
|
569
|
+
protected setClass(newCssClass: string, oldCssClass?: string): void;
|
|
570
|
+
protected isDayLightSaving(): boolean;
|
|
571
|
+
protected setTimeZone(offsetValue: number): void;
|
|
572
|
+
protected formResetHandler(): void;
|
|
573
|
+
protected validateDate(): void;
|
|
574
|
+
protected minMaxUpdate(): void;
|
|
575
|
+
protected generateTodayVal(value: Date): Date;
|
|
576
|
+
protected todayButtonClick(e?: MouseEvent | KeyboardEvent): void;
|
|
577
|
+
protected keyActionHandle(e: KeyboardEventArgs): void;
|
|
578
|
+
/**
|
|
579
|
+
* Initialize the event handler
|
|
580
|
+
*
|
|
581
|
+
* @returns {void}
|
|
582
|
+
* @private
|
|
583
|
+
*/
|
|
584
|
+
protected preRender(): void;
|
|
585
|
+
/**
|
|
586
|
+
* @returns {void}
|
|
587
|
+
* @deprecated
|
|
588
|
+
*/
|
|
589
|
+
createContent(): void;
|
|
590
|
+
protected minMaxDate(localDate: Date): Date;
|
|
591
|
+
protected renderMonths(e?: Event, value?: Date, isCustomDate?: boolean): void;
|
|
592
|
+
protected renderDays(currentDate: Date, value?: Date, isMultiSelect?: boolean, values?: Date[], isCustomDate?: boolean, e?: Event): HTMLElement[];
|
|
593
|
+
protected renderYears(e?: Event): void;
|
|
594
|
+
protected renderDecades(e?: Event): void;
|
|
595
|
+
protected renderTemplate(elements: HTMLElement[], count: number, classNm: string, e?: Event): void;
|
|
596
|
+
protected clickHandler(e: MouseEvent): void;
|
|
597
|
+
protected switchView(view: number, e?: Event, isMultiSelection?: boolean, isCustomDate?: boolean): void;
|
|
598
|
+
/**
|
|
599
|
+
* To get component name
|
|
600
|
+
*
|
|
601
|
+
* @returns {string} Return the component name.
|
|
602
|
+
* @private
|
|
603
|
+
*/
|
|
604
|
+
protected getModuleName(): string;
|
|
605
|
+
/**
|
|
606
|
+
* Gets the properties to be maintained upon browser refresh.
|
|
607
|
+
*
|
|
608
|
+
* @returns {string}
|
|
609
|
+
*/
|
|
610
|
+
getPersistData(): string;
|
|
611
|
+
/**
|
|
612
|
+
* Called internally if any of the property value changed.
|
|
613
|
+
*
|
|
614
|
+
* @param {CalendarModel} newProp - Returns the dynamic property value of the component.
|
|
615
|
+
* @param {CalendarModel} oldProp - Returns the previous property value of the component.
|
|
616
|
+
* @returns {void}
|
|
617
|
+
* @private
|
|
618
|
+
*/
|
|
619
|
+
onPropertyChanged(newProp: CalendarModel, oldProp: CalendarModel): void;
|
|
620
|
+
/**
|
|
621
|
+
* Destroys the widget.
|
|
622
|
+
*
|
|
623
|
+
* @returns {void}
|
|
624
|
+
*/
|
|
625
|
+
destroy(): void;
|
|
626
|
+
/**
|
|
627
|
+
* This method is used to navigate to the month/year/decade view of the Calendar.
|
|
628
|
+
*
|
|
629
|
+
* @param {string} view - Specifies the view of the Calendar.
|
|
630
|
+
* @param {Date} date - Specifies the focused date in a view.
|
|
631
|
+
* @param {boolean} isCustomDate - Specifies whether the calendar is rendered with custom today date or not.
|
|
632
|
+
* @returns {void}
|
|
633
|
+
* @deprecated
|
|
634
|
+
*/
|
|
635
|
+
navigateTo(view: CalendarView, date: Date, isCustomDate?: boolean): void;
|
|
636
|
+
/**
|
|
637
|
+
* Gets the current view of the Calendar.
|
|
638
|
+
*
|
|
639
|
+
* @returns {string}
|
|
640
|
+
* @deprecated
|
|
641
|
+
*/
|
|
642
|
+
currentView(): string;
|
|
643
|
+
/**
|
|
644
|
+
* This method is used to add the single or multiple dates to the values property of the Calendar.
|
|
645
|
+
*
|
|
646
|
+
* @param {Date | Date[]} dates - Specifies the date or dates to be added to the values property of the Calendar.
|
|
647
|
+
* @returns {void}
|
|
648
|
+
* @deprecated
|
|
649
|
+
*/
|
|
650
|
+
addDate(dates: Date | Date[]): void;
|
|
651
|
+
/**
|
|
652
|
+
* This method is used to remove the single or multiple dates from the values property of the Calendar.
|
|
653
|
+
*
|
|
654
|
+
* @param {Date | Date[]} dates - Specifies the date or dates which need to be removed from the values property of the Calendar.
|
|
655
|
+
* @returns {void}
|
|
656
|
+
* @deprecated
|
|
657
|
+
*/
|
|
658
|
+
removeDate(dates: Date | Date[]): void;
|
|
659
|
+
/**
|
|
660
|
+
* To set custom today date in calendar
|
|
661
|
+
*
|
|
662
|
+
* @param {Date} date - Specifies date value to be set.
|
|
663
|
+
* @private
|
|
664
|
+
* @returns {void}
|
|
665
|
+
*/
|
|
666
|
+
setTodayDate(date: Date): void;
|
|
667
|
+
protected update(): void;
|
|
668
|
+
protected selectDate(e: MouseEvent | KeyboardEventArgs, date: Date, element: Element): void;
|
|
669
|
+
protected changeEvent(e: Event): void;
|
|
670
|
+
protected triggerChange(e: MouseEvent | KeyboardEvent): void;
|
|
671
|
+
}
|
|
672
|
+
export interface NavigatedEventArgs extends BaseEventArgs {
|
|
673
|
+
/** Defines the current view of the Calendar. */
|
|
674
|
+
view?: string;
|
|
675
|
+
/** Defines the focused date in a view. */
|
|
676
|
+
date?: Date;
|
|
677
|
+
/**
|
|
678
|
+
* Specifies the original event arguments.
|
|
679
|
+
*/
|
|
680
|
+
event?: KeyboardEvent | MouseEvent | Event;
|
|
681
|
+
}
|
|
682
|
+
export interface RenderDayCellEventArgs extends BaseEventArgs {
|
|
683
|
+
/** Specifies whether to disable the current date or not. */
|
|
684
|
+
isDisabled?: boolean;
|
|
685
|
+
/** Specifies the day cell element. */
|
|
686
|
+
element?: HTMLElement;
|
|
687
|
+
/** Defines the current date of the Calendar. */
|
|
688
|
+
date?: Date;
|
|
689
|
+
/** Defines whether the current date is out of range (less than min or greater than max) or not. */
|
|
690
|
+
isOutOfRange?: boolean;
|
|
691
|
+
}
|
|
692
|
+
export interface ChangedEventArgs extends BaseEventArgs {
|
|
693
|
+
/** Defines the selected date of the Calendar.
|
|
694
|
+
*
|
|
695
|
+
* @isGenericType true
|
|
696
|
+
*/
|
|
697
|
+
value?: Date;
|
|
698
|
+
/** Defines the multiple selected date of the Calendar. */
|
|
699
|
+
values?: Date[];
|
|
700
|
+
/**
|
|
701
|
+
* Specifies the original event arguments.
|
|
702
|
+
*/
|
|
703
|
+
event?: KeyboardEvent | MouseEvent | Event;
|
|
704
|
+
/** Defines the element. */
|
|
705
|
+
element?: HTMLElement | HTMLInputElement;
|
|
706
|
+
/**
|
|
707
|
+
* If the event is triggered by interaction, it returns true. Otherwise, it returns false.
|
|
708
|
+
*/
|
|
709
|
+
isInteracted?: boolean;
|
|
710
|
+
}
|
|
711
|
+
export interface IslamicObject {
|
|
712
|
+
year: number;
|
|
713
|
+
date: number;
|
|
714
|
+
month: number;
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* Defines the argument for the focus event.
|
|
718
|
+
*/
|
|
719
|
+
export interface FocusEventArgs {
|
|
720
|
+
model?: Object;
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* Defines the argument for the blur event.
|
|
724
|
+
*/
|
|
725
|
+
export interface BlurEventArgs {
|
|
726
|
+
model?: Object;
|
|
727
|
+
}
|
|
728
|
+
export interface ClearedEventArgs {
|
|
729
|
+
/**
|
|
730
|
+
* Specifies the original event arguments.
|
|
731
|
+
*/
|
|
732
|
+
event?: MouseEvent | Event;
|
|
733
|
+
}
|