@syncfusion/ej2-calendars 31.1.17 → 31.1.18
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/aceconfig.js +17 -0
- package/dist/ej2-calendars.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js.map +1 -1
- package/dist/es6/ej2-calendars.es2015.js +36 -13
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +36 -13
- package/dist/es6/ej2-calendars.es5.js.map +1 -1
- package/dist/global/ej2-calendars.min.js +2 -2
- package/dist/global/ej2-calendars.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -54
- package/src/datepicker/datepicker.js +28 -13
- package/src/daterangepicker/daterangepicker.js +8 -0
- package/dist/ts/calendar/calendar-model.d.ts +0 -340
- package/dist/ts/calendar/calendar.d.ts +0 -733
- package/dist/ts/calendar/calendar.ts +0 -3009
- package/dist/ts/calendar/index.d.ts +0 -6
- package/dist/ts/calendar/index.ts +0 -6
- package/dist/ts/calendar/islamic.d.ts +0 -28
- package/dist/ts/calendar/islamic.ts +0 -597
- package/dist/ts/common/index.d.ts +0 -5
- package/dist/ts/common/index.ts +0 -5
- package/dist/ts/common/maskplaceholder-model.d.ts +0 -57
- package/dist/ts/common/maskplaceholder.d.ts +0 -45
- package/dist/ts/common/maskplaceholder.ts +0 -54
- package/dist/ts/datepicker/datepicker-model.d.ts +0 -364
- package/dist/ts/datepicker/datepicker.d.ts +0 -583
- package/dist/ts/datepicker/datepicker.ts +0 -2528
- package/dist/ts/datepicker/index.d.ts +0 -5
- package/dist/ts/datepicker/index.ts +0 -5
- package/dist/ts/daterangepicker/daterangepicker-model.d.ts +0 -496
- package/dist/ts/daterangepicker/daterangepicker.d.ts +0 -857
- package/dist/ts/daterangepicker/daterangepicker.ts +0 -5096
- package/dist/ts/daterangepicker/index.d.ts +0 -5
- package/dist/ts/daterangepicker/index.ts +0 -5
- package/dist/ts/datetimepicker/datetimepicker-model.d.ts +0 -479
- package/dist/ts/datetimepicker/datetimepicker.d.ts +0 -626
- package/dist/ts/datetimepicker/datetimepicker.ts +0 -2212
- package/dist/ts/datetimepicker/index.d.ts +0 -5
- package/dist/ts/datetimepicker/index.ts +0 -5
- package/dist/ts/index.d.ts +0 -9
- package/dist/ts/index.ts +0 -9
- package/dist/ts/maskbase/index.d.ts +0 -5
- package/dist/ts/maskbase/index.ts +0 -5
- package/dist/ts/maskbase/interface.d.ts +0 -28
- package/dist/ts/maskbase/interface.ts +0 -29
- package/dist/ts/maskbase/masked-date-time.d.ts +0 -77
- package/dist/ts/maskbase/masked-date-time.ts +0 -1013
- package/dist/ts/timepicker/index.d.ts +0 -5
- package/dist/ts/timepicker/index.ts +0 -5
- package/dist/ts/timepicker/timepicker-model.d.ts +0 -393
- package/dist/ts/timepicker/timepicker.d.ts +0 -681
- package/dist/ts/timepicker/timepicker.ts +0 -2944
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Calendar } from './calendar';
|
|
2
|
-
export declare class Islamic {
|
|
3
|
-
constructor(instance: Calendar);
|
|
4
|
-
private calendarInstance;
|
|
5
|
-
getModuleName(): string;
|
|
6
|
-
islamicTitleUpdate(date: Date, view: string): void;
|
|
7
|
-
islamicRenderDays(currentDate: Date, value?: Date, multiSelection?: boolean, values?: Date[]): HTMLElement[];
|
|
8
|
-
islamicIconHandler(): void;
|
|
9
|
-
islamicNext(): void;
|
|
10
|
-
islamicPrevious(): void;
|
|
11
|
-
islamicRenderYears(e?: Event, value?: Date): void;
|
|
12
|
-
islamicRenderDecade(e?: Event, value?: Date): void;
|
|
13
|
-
islamicDayCell(localDate: Date): HTMLElement;
|
|
14
|
-
islamicRenderTemplate(elements: HTMLElement[], count: number, classNm: string, e?: Event, value?: Date): void;
|
|
15
|
-
islamicCompareMonth(start: Date, end: Date): number;
|
|
16
|
-
islamicCompare(startDate: Date, endDate: Date, modifier: number): number;
|
|
17
|
-
getIslamicDate(date: Date): any;
|
|
18
|
-
toGregorian(year: number, month: number, date: number): Date;
|
|
19
|
-
hijriCompareYear(start: Date, end: Date): number;
|
|
20
|
-
hijriCompareDecade(start: Date, end: Date): number;
|
|
21
|
-
destroy(): void;
|
|
22
|
-
protected islamicInValue(inValue: string | Date | number): string;
|
|
23
|
-
}
|
|
24
|
-
export interface IslamicDateArgs {
|
|
25
|
-
year: number;
|
|
26
|
-
date: number;
|
|
27
|
-
month: number;
|
|
28
|
-
}
|
|
@@ -1,597 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*/
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
-
import { EventHandler, Internationalization, KeyboardEventArgs } from '@syncfusion/ej2-base';
|
|
6
|
-
import { rippleEffect } from '@syncfusion/ej2-base';
|
|
7
|
-
import { removeClass, addClass, attributes, HijriParser } from '@syncfusion/ej2-base';
|
|
8
|
-
import { getUniqueID } from '@syncfusion/ej2-base';
|
|
9
|
-
import { isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
10
|
-
import { Calendar, RenderDayCellEventArgs } from './calendar';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
//class constant defination.
|
|
14
|
-
const OTHERMONTH: string = 'e-other-month';
|
|
15
|
-
|
|
16
|
-
const YEAR: string = 'e-year';
|
|
17
|
-
const MONTH: string = 'e-month';
|
|
18
|
-
const DECADE: string = 'e-decade';
|
|
19
|
-
const DISABLED: string = 'e-disabled';
|
|
20
|
-
const OVERLAY: string = 'e-overlay';
|
|
21
|
-
const WEEKEND: string = 'e-weekend';
|
|
22
|
-
const WEEKNUMBER: string = 'e-week-number';
|
|
23
|
-
const SELECTED: string = 'e-selected';
|
|
24
|
-
const FOCUSEDDATE: string = 'e-focused-date';
|
|
25
|
-
const OTHERMONTHROW: string = 'e-month-hide';
|
|
26
|
-
const TODAY: string = 'e-today';
|
|
27
|
-
const LINK: string = 'e-day';
|
|
28
|
-
const CELL: string = 'e-cell';
|
|
29
|
-
const dayMilliSeconds: number = 86400000;
|
|
30
|
-
const minDecade: number = 2058;
|
|
31
|
-
const maxDecade: number = 2069;
|
|
32
|
-
export class Islamic {
|
|
33
|
-
public constructor(instance: Calendar) {
|
|
34
|
-
this.calendarInstance = instance;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
private calendarInstance: any;
|
|
38
|
-
public getModuleName(): string {
|
|
39
|
-
return 'islamic';
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
public islamicTitleUpdate(date: Date, view: string): void {
|
|
43
|
-
const globalize: Internationalization = new Internationalization(this.calendarInstance.locale);
|
|
44
|
-
switch (view) {
|
|
45
|
-
case 'days':
|
|
46
|
-
this.calendarInstance.headerTitleElement.textContent = globalize.formatDate(
|
|
47
|
-
date, { type: 'dateTime', format: 'MMMMyyyy', calendar: 'islamic' });
|
|
48
|
-
break;
|
|
49
|
-
case 'months':
|
|
50
|
-
this.calendarInstance.headerTitleElement.textContent = globalize.formatDate(
|
|
51
|
-
date, { type: 'dateTime', format: 'yyyy', calendar: 'islamic' });
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
public islamicRenderDays(currentDate: Date, value?: Date, multiSelection?: boolean, values?: Date[]): HTMLElement[] {
|
|
55
|
-
const tdEles: HTMLElement[] = [];
|
|
56
|
-
const cellsCount: number = 42;
|
|
57
|
-
let localDate: Date = new Date(this.islamicInValue(currentDate));
|
|
58
|
-
let minMaxDate: Date;
|
|
59
|
-
this.islamicTitleUpdate(currentDate, 'days');
|
|
60
|
-
const islamicDate: any = this.getIslamicDate(localDate);
|
|
61
|
-
const gregorianObject: Date = this.toGregorian(islamicDate.year, islamicDate.month, 1);
|
|
62
|
-
const currentMonth: number = islamicDate.month;
|
|
63
|
-
localDate = gregorianObject;
|
|
64
|
-
while (localDate.getDay() !== this.calendarInstance.firstDayOfWeek) {
|
|
65
|
-
this.calendarInstance.setStartDate(localDate, -1 * dayMilliSeconds);
|
|
66
|
-
}
|
|
67
|
-
for (let day: number = 0; day < cellsCount; ++day) {
|
|
68
|
-
const weekEle: HTMLElement = this.calendarInstance.createElement('td', { className: CELL });
|
|
69
|
-
const weekAnchor: HTMLElement = this.calendarInstance.createElement('span');
|
|
70
|
-
if (day % 7 === 0 && this.calendarInstance.weekNumber) {
|
|
71
|
-
weekAnchor.textContent = '' + this.calendarInstance.getWeek(localDate);
|
|
72
|
-
weekEle.appendChild(weekAnchor);
|
|
73
|
-
addClass([weekEle], '' + WEEKNUMBER);
|
|
74
|
-
tdEles.push(weekEle);
|
|
75
|
-
}
|
|
76
|
-
minMaxDate = new Date(+localDate);
|
|
77
|
-
localDate = this.calendarInstance.minMaxDate(localDate);
|
|
78
|
-
const dateFormatOptions: object = { type: 'dateTime', skeleton: 'full', calendar: 'islamic' };
|
|
79
|
-
const date: Date = this.calendarInstance.globalize.parseDate(
|
|
80
|
-
this.calendarInstance.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions);
|
|
81
|
-
const tdEle: HTMLElement = this.islamicDayCell(localDate);
|
|
82
|
-
const title: string = this.calendarInstance.globalize.formatDate(
|
|
83
|
-
localDate, { type: 'date', skeleton: 'full', calendar: 'islamic' });
|
|
84
|
-
const dayLink: HTMLElement = this.calendarInstance.createElement('span');
|
|
85
|
-
dayLink.textContent = this.calendarInstance.globalize.formatDate(
|
|
86
|
-
localDate, { type: 'date', skeleton: 'd', calendar: 'islamic' });
|
|
87
|
-
const disabled: boolean = (this.calendarInstance.min > localDate) || (this.calendarInstance.max < localDate);
|
|
88
|
-
if (disabled) {
|
|
89
|
-
addClass([tdEle], DISABLED);
|
|
90
|
-
addClass([tdEle], OVERLAY);
|
|
91
|
-
} else {
|
|
92
|
-
dayLink.setAttribute('title', '' + title);
|
|
93
|
-
}
|
|
94
|
-
const hijriMonthObject: any = this.getIslamicDate(localDate);
|
|
95
|
-
if (currentMonth !== hijriMonthObject.month) {
|
|
96
|
-
addClass([tdEle], OTHERMONTH);
|
|
97
|
-
}
|
|
98
|
-
if (localDate.getDay() === 0 || localDate.getDay() === 6) {
|
|
99
|
-
addClass([tdEle], WEEKEND);
|
|
100
|
-
}
|
|
101
|
-
tdEle.appendChild(dayLink);
|
|
102
|
-
this.calendarInstance.renderDayCellArgs = {
|
|
103
|
-
date: localDate,
|
|
104
|
-
isDisabled: false,
|
|
105
|
-
element: tdEle,
|
|
106
|
-
isOutOfRange: disabled
|
|
107
|
-
};
|
|
108
|
-
const argument: RenderDayCellEventArgs = this.calendarInstance.renderDayCellArgs;
|
|
109
|
-
this.calendarInstance.renderDayCellEvent(argument);
|
|
110
|
-
if (argument.isDisabled) {
|
|
111
|
-
if (this.calendarInstance.isMultiSelection) {
|
|
112
|
-
if (!isNullOrUndefined(this.calendarInstance.values) && this.calendarInstance.values.length > 0) {
|
|
113
|
-
for (let index: number = 0; index < values.length; index++) {
|
|
114
|
-
const localDateString: number = +new Date(this.calendarInstance.globalize.formatDate(
|
|
115
|
-
argument.date, { type: 'date', skeleton: 'yMd', calendar: 'islamic' }));
|
|
116
|
-
const tempDateString: number = +new Date(this.calendarInstance.globalize.formatDate(
|
|
117
|
-
this.calendarInstance.values[index as number], { type: 'date', skeleton: 'yMd', calendar: 'islamic' }));
|
|
118
|
-
if (localDateString === tempDateString) {
|
|
119
|
-
this.calendarInstance.values.splice(index, 1);
|
|
120
|
-
index = -1;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
} else if (value && +value === +argument.date) {
|
|
126
|
-
this.calendarInstance.setProperties({ value: null }, true);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
if (this.calendarInstance.renderDayCellArgs.isDisabled && !tdEle.classList.contains(SELECTED)) {
|
|
130
|
-
addClass([tdEle], DISABLED);
|
|
131
|
-
addClass([tdEle], OVERLAY);
|
|
132
|
-
if (+this.calendarInstance.renderDayCellArgs.date === +this.calendarInstance.todayDate) {
|
|
133
|
-
this.calendarInstance.todayDisabled = true;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
const otherMnthBool: boolean = tdEle.classList.contains(OTHERMONTH);
|
|
137
|
-
const disabledCls: boolean = tdEle.classList.contains(DISABLED);
|
|
138
|
-
if (!disabledCls) {
|
|
139
|
-
EventHandler.add(tdEle, 'click', this.calendarInstance.clickHandler, this.calendarInstance);
|
|
140
|
-
}
|
|
141
|
-
if (this.calendarInstance.isMultiSelection && !isNullOrUndefined(this.calendarInstance.values) &&
|
|
142
|
-
!otherMnthBool && !disabledCls) {
|
|
143
|
-
for (let tempValue: number = 0; tempValue < this.calendarInstance.values.length; tempValue++) {
|
|
144
|
-
const localDateString: string = this.calendarInstance.globalize.formatDate(
|
|
145
|
-
localDate, { type: 'date', skeleton: 'short', calendar: 'islamic' });
|
|
146
|
-
const tempDateString: string = this.calendarInstance.globalize.formatDate(
|
|
147
|
-
this.calendarInstance.values[tempValue as number], { type: 'date', skeleton: 'short', calendar: 'islamic' });
|
|
148
|
-
if (localDateString === tempDateString &&
|
|
149
|
-
this.calendarInstance.getDateVal(localDate, this.calendarInstance.values[tempValue as number])) {
|
|
150
|
-
addClass([tdEle], SELECTED);
|
|
151
|
-
} else {
|
|
152
|
-
this.calendarInstance.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
if (this.calendarInstance.values.length <= 0) {
|
|
156
|
-
this.calendarInstance.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
|
|
157
|
-
}
|
|
158
|
-
} else if (!otherMnthBool && !disabledCls && this.calendarInstance.getDateVal(localDate, value)) {
|
|
159
|
-
addClass([tdEle], SELECTED);
|
|
160
|
-
} else {
|
|
161
|
-
this.calendarInstance.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);
|
|
162
|
-
}
|
|
163
|
-
if (date.getDate() === new Date().getDate() && date.getMonth() === new Date().getMonth()) {
|
|
164
|
-
if (date.getFullYear() === new Date().getFullYear()) {
|
|
165
|
-
addClass([tdEle], TODAY);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
localDate = new Date(+minMaxDate);
|
|
169
|
-
tdEles.push(this.calendarInstance.renderDayCellArgs.element);
|
|
170
|
-
this.calendarInstance.addDay(localDate, 1, null, this.calendarInstance.max, this.calendarInstance.min);
|
|
171
|
-
}
|
|
172
|
-
return tdEles;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
public islamicIconHandler(): void {
|
|
176
|
-
new Date(this.islamicInValue(this.calendarInstance.currentDate)).setDate(1);
|
|
177
|
-
const date: Date = new Date(this.islamicInValue(this.calendarInstance.currentDate));
|
|
178
|
-
switch (this.calendarInstance.currentView()) {
|
|
179
|
-
case 'Month': {
|
|
180
|
-
const prevMonthCompare: boolean =
|
|
181
|
-
this.islamicCompareMonth(date, this.calendarInstance.min) < 1;
|
|
182
|
-
const nextMonthCompare: boolean =
|
|
183
|
-
this.islamicCompareMonth(date, this.calendarInstance.max) > -1;
|
|
184
|
-
this.calendarInstance.previousIconHandler(prevMonthCompare);
|
|
185
|
-
this.calendarInstance.nextIconHandler(nextMonthCompare);
|
|
186
|
-
}
|
|
187
|
-
break;
|
|
188
|
-
case 'Year': {
|
|
189
|
-
const prevYearCompare: boolean =
|
|
190
|
-
this.hijriCompareYear(date, this.calendarInstance.min) < 1;
|
|
191
|
-
const nextYearCompare: boolean =
|
|
192
|
-
this.hijriCompareYear(date, this.calendarInstance.max) > -1;
|
|
193
|
-
this.calendarInstance.previousIconHandler(prevYearCompare);
|
|
194
|
-
this.calendarInstance.nextIconHandler(nextYearCompare);
|
|
195
|
-
}
|
|
196
|
-
break;
|
|
197
|
-
case 'Decade': {
|
|
198
|
-
const startIslamicYear: number = 1361;
|
|
199
|
-
const gregorianValue: Date = HijriParser.toGregorian(startIslamicYear, 1, 1);
|
|
200
|
-
let prevDecadeCompare: boolean =
|
|
201
|
-
this.hijriCompareDecade(date, this.calendarInstance.min) < 1;
|
|
202
|
-
const nextDecadeCompare: boolean =
|
|
203
|
-
this.hijriCompareDecade(date, this.calendarInstance.max) > -1;
|
|
204
|
-
prevDecadeCompare = HijriParser.toGregorian(this.calendarInstance.headerTitleElement.textContent.split('-')[0].trim(), 1, 1).getFullYear() === gregorianValue.getFullYear() ? true : prevDecadeCompare;
|
|
205
|
-
this.calendarInstance.previousIconHandler(prevDecadeCompare);
|
|
206
|
-
this.calendarInstance.nextIconHandler(nextDecadeCompare);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
public islamicNext(): void {
|
|
211
|
-
this.calendarInstance.effect = '';
|
|
212
|
-
const view: number = this.calendarInstance.getViewNumber(this.calendarInstance.currentView());
|
|
213
|
-
const islamicDate: any = this.getIslamicDate(this.calendarInstance.currentDate);
|
|
214
|
-
switch (this.calendarInstance.currentView()) {
|
|
215
|
-
case 'Year':
|
|
216
|
-
this.calendarInstance.currentDate = this.toGregorian(islamicDate.year + 1, islamicDate.month, 1);
|
|
217
|
-
this.calendarInstance.switchView(view);
|
|
218
|
-
break;
|
|
219
|
-
case 'Month':
|
|
220
|
-
this.calendarInstance.currentDate = this.toGregorian(islamicDate.year, islamicDate.month + 1, 1);
|
|
221
|
-
this.calendarInstance.switchView(view);
|
|
222
|
-
break;
|
|
223
|
-
case 'Decade':
|
|
224
|
-
this.calendarInstance.nextIconClicked = true;
|
|
225
|
-
if (islamicDate.year - this.calendarInstance.headerElement.textContent.split('-')[0].trim() === 1) {
|
|
226
|
-
islamicDate.year = islamicDate.year - this.calendarInstance.headerElement.textContent.split('-')[0].trim() === 1 ? islamicDate.year + 1 : islamicDate.year;
|
|
227
|
-
}
|
|
228
|
-
this.calendarInstance.currentDate = this.toGregorian(islamicDate.year + 10, islamicDate.month, 1);
|
|
229
|
-
this.calendarInstance.switchView(view);
|
|
230
|
-
break;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
public islamicPrevious(): void {
|
|
234
|
-
const currentView: number = this.calendarInstance.getViewNumber(this.calendarInstance.currentView());
|
|
235
|
-
this.calendarInstance.effect = '';
|
|
236
|
-
const islamicDate: any = this.getIslamicDate(this.calendarInstance.currentDate);
|
|
237
|
-
switch (this.calendarInstance.currentView()) {
|
|
238
|
-
case 'Month':
|
|
239
|
-
this.calendarInstance.currentDate = this.toGregorian(islamicDate.year, islamicDate.month - 1, 1);
|
|
240
|
-
this.calendarInstance.switchView(currentView);
|
|
241
|
-
break;
|
|
242
|
-
case 'Year':
|
|
243
|
-
this.calendarInstance.currentDate = this.toGregorian(islamicDate.year - 1, islamicDate.month, 1);
|
|
244
|
-
this.calendarInstance.switchView(currentView);
|
|
245
|
-
break;
|
|
246
|
-
case 'Decade':
|
|
247
|
-
this.calendarInstance.previousIconClicked = true;
|
|
248
|
-
this.calendarInstance.currentDate = this.toGregorian(islamicDate.year - 10, islamicDate.month - 1, 1);
|
|
249
|
-
this.calendarInstance.switchView(currentView);
|
|
250
|
-
break;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
public islamicRenderYears(e?: Event, value?: Date): void {
|
|
255
|
-
this.calendarInstance.removeTableHeadElement();
|
|
256
|
-
const numCells: number = 4;
|
|
257
|
-
const tdEles: HTMLElement[] = [];
|
|
258
|
-
const valueUtil: boolean = isNullOrUndefined(value);
|
|
259
|
-
const curDate: Date = new Date(this.islamicInValue(this.calendarInstance.currentDate));
|
|
260
|
-
let localDate: Date = curDate;
|
|
261
|
-
const islamicDate: any = this.getIslamicDate(localDate);
|
|
262
|
-
const gregorianObject: Date = HijriParser.toGregorian(islamicDate.year, 1, 1);
|
|
263
|
-
localDate = gregorianObject;
|
|
264
|
-
const mon: number = islamicDate.month;
|
|
265
|
-
const yr: number = islamicDate.year;
|
|
266
|
-
const curYrs: number = islamicDate.year;
|
|
267
|
-
const minYr: number = (<any>(this.getIslamicDate(this.calendarInstance.min))).year;
|
|
268
|
-
const minMonth: number = (<any>(this.getIslamicDate(this.calendarInstance.min))).month;
|
|
269
|
-
const maxYr: number = (<any>(this.getIslamicDate(this.calendarInstance.max))).year;
|
|
270
|
-
const maxMonth: number = (<any>(this.getIslamicDate(this.calendarInstance.max))).month;
|
|
271
|
-
this.islamicTitleUpdate(this.calendarInstance.currentDate, 'months');
|
|
272
|
-
for (let month: number = 1; month <= 12; ++month) {
|
|
273
|
-
const islamicDate: any = this.getIslamicDate(localDate);
|
|
274
|
-
const gregorianObject: Date = HijriParser.toGregorian(islamicDate.year, month, 1);
|
|
275
|
-
localDate = gregorianObject;
|
|
276
|
-
const tdEle: HTMLElement = this.islamicDayCell(localDate);
|
|
277
|
-
const dayLink: HTMLElement = this.calendarInstance.createElement('span');
|
|
278
|
-
const localMonth: boolean = (value &&
|
|
279
|
-
(<any>(this.getIslamicDate(value))).month === (<any>(this.getIslamicDate(localDate))).month);
|
|
280
|
-
const select: boolean = (value && (<any>(this.getIslamicDate(value))).year === yr && localMonth);
|
|
281
|
-
dayLink.textContent = this.calendarInstance.globalize.formatDate(
|
|
282
|
-
localDate, { type: 'dateTime', format: 'MMM', calendar: 'islamic' });
|
|
283
|
-
if ((this.calendarInstance.min && (curYrs < minYr || (month < minMonth && curYrs === minYr))) || (
|
|
284
|
-
this.calendarInstance.max && (curYrs > maxYr || (month > maxMonth && curYrs >= maxYr)))) {
|
|
285
|
-
addClass([tdEle], DISABLED);
|
|
286
|
-
} else if (!valueUtil && select) {
|
|
287
|
-
addClass([tdEle], SELECTED);
|
|
288
|
-
} else {
|
|
289
|
-
if ((<any>(this.getIslamicDate(localDate))).month === mon &&
|
|
290
|
-
(<any>(this.getIslamicDate(this.calendarInstance.currentDate))).month === mon) {
|
|
291
|
-
addClass([tdEle], FOCUSEDDATE);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
if (!tdEle.classList.contains(DISABLED)) {
|
|
295
|
-
EventHandler.add(tdEle, 'click', this.calendarInstance.clickHandler, this.calendarInstance);
|
|
296
|
-
}
|
|
297
|
-
tdEle.appendChild(dayLink);
|
|
298
|
-
tdEles.push(tdEle);
|
|
299
|
-
}
|
|
300
|
-
this.islamicRenderTemplate(tdEles, numCells, YEAR, e, value);
|
|
301
|
-
}
|
|
302
|
-
public islamicRenderDecade(e?: Event, value?: Date): void {
|
|
303
|
-
this.calendarInstance.removeTableHeadElement();
|
|
304
|
-
const numCells: number = 4;
|
|
305
|
-
const yearCell: number = 12;
|
|
306
|
-
const tdEles: HTMLElement[] = [];
|
|
307
|
-
let localDate: Date = new Date(this.islamicInValue(this.calendarInstance.currentDate));
|
|
308
|
-
let islamicDate: any = this.getIslamicDate(localDate);
|
|
309
|
-
const gregorianObject: Date = HijriParser.toGregorian(islamicDate.year, 1, 1);
|
|
310
|
-
localDate = gregorianObject;
|
|
311
|
-
const localYr: number = localDate.getFullYear();
|
|
312
|
-
const startYr: Date = new Date(this.islamicInValue((localYr - localYr % 10)));
|
|
313
|
-
const endYr: Date = new Date(this.islamicInValue((localYr - localYr % 10 + (10 - 1))));
|
|
314
|
-
let startFullYr: number = startYr.getFullYear();
|
|
315
|
-
let endFullYr: number = endYr.getFullYear();
|
|
316
|
-
let startHdrYr: any = this.calendarInstance.globalize.formatDate(
|
|
317
|
-
startYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
|
|
318
|
-
let endHdrYr: any = this.calendarInstance.globalize.formatDate(endYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
|
|
319
|
-
if (islamicDate.year % 10 === 1) {
|
|
320
|
-
startHdrYr = islamicDate.year;
|
|
321
|
-
endHdrYr = islamicDate.year + 9;
|
|
322
|
-
}
|
|
323
|
-
else if (islamicDate.year % 10 > 1 ) {
|
|
324
|
-
startHdrYr = islamicDate.year - ((islamicDate.year % 10) - 1);
|
|
325
|
-
endHdrYr = startHdrYr + 9;
|
|
326
|
-
}
|
|
327
|
-
else if (islamicDate.year % 10 === 0) {
|
|
328
|
-
startHdrYr = islamicDate.year - 9;
|
|
329
|
-
endHdrYr = islamicDate.year;
|
|
330
|
-
}
|
|
331
|
-
if (this.calendarInstance.locale === 'ar') {
|
|
332
|
-
startHdrYr = Number(startHdrYr.toString().replace(/[٠١٢٣٤٥٦٧٨٩]/g, (d: any) => String.fromCharCode(d.charCodeAt(0) - 1632 + 48)));
|
|
333
|
-
endHdrYr = Number(endHdrYr.toString().replace(/[٠١٢٣٤٥٦٧٨٩]/g, (d: any) => String.fromCharCode(d.charCodeAt(0) - 1632 + 48)));
|
|
334
|
-
}
|
|
335
|
-
const splityear: any = this.calendarInstance.headerElement.textContent.split('-');
|
|
336
|
-
if ((!isNullOrUndefined(e) && (splityear[0] !== startHdrYr) && (e as KeyboardEventArgs).action === 'home') ||
|
|
337
|
-
(!isNullOrUndefined(e) && e.type === 'keydown' && (e as KeyboardEventArgs).action === 'end')) {
|
|
338
|
-
startHdrYr = this.calendarInstance.headerElement.textContent.split('-')[0].trim();
|
|
339
|
-
endHdrYr = this.calendarInstance.headerElement.textContent.split('-')[1].trim();
|
|
340
|
-
}
|
|
341
|
-
if (this.calendarInstance.islamicPreviousHeader) {
|
|
342
|
-
startHdrYr = this.calendarInstance.islamicPreviousHeader.split('-')[0].trim();
|
|
343
|
-
endHdrYr = this.calendarInstance.islamicPreviousHeader.split('-')[1].trim();
|
|
344
|
-
this.calendarInstance.islamicPreviousHeader = null;
|
|
345
|
-
}
|
|
346
|
-
if (this.calendarInstance.previousIconClicked) {
|
|
347
|
-
let i: number = 0;
|
|
348
|
-
for (i = 0; i <= splityear.length; i++) {
|
|
349
|
-
endHdrYr = endHdrYr - splityear[i as number] === 2 || splityear[i as number]
|
|
350
|
-
- endHdrYr === 2 ? (parseInt(endHdrYr, 10) + 1).toString() :
|
|
351
|
-
endHdrYr - splityear[i as number] === 3 || splityear[i as number] - endHdrYr === 3 ?
|
|
352
|
-
(parseInt(endHdrYr, 10) + 2).toString() : endHdrYr - splityear[i as number] === 4 ||
|
|
353
|
-
splityear[i as number] - endHdrYr === 4 ? (parseInt(endHdrYr, 10) + 3).toString() :
|
|
354
|
-
endHdrYr - splityear[i as number] === 5 || splityear[i as number] - endHdrYr === 5 ?
|
|
355
|
-
(parseInt(endHdrYr, 10) + 4).toString() : endHdrYr;
|
|
356
|
-
if (endHdrYr - splityear[i as number] === 0 || splityear[i as number] - endHdrYr === 0) {
|
|
357
|
-
endHdrYr = (parseInt(endHdrYr, 10) - 1).toString();
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
if (endHdrYr - splityear[i as number] === 8 || splityear[i as number] - endHdrYr === 8) {
|
|
361
|
-
endHdrYr = (parseInt(endHdrYr, 10) - 9).toString();
|
|
362
|
-
startHdrYr = (parseInt(endHdrYr, 10) - 9).toString();
|
|
363
|
-
}
|
|
364
|
-
if (endHdrYr - splityear[i as number] === 7 || splityear[i as number] - endHdrYr === 7) {
|
|
365
|
-
endHdrYr = (parseInt(endHdrYr, 10) - 8).toString();
|
|
366
|
-
startHdrYr = (parseInt(endHdrYr, 10) - 9).toString();
|
|
367
|
-
}
|
|
368
|
-
startHdrYr = endHdrYr - startHdrYr === 10
|
|
369
|
-
? (parseInt(startHdrYr, 10) + 1).toString() : endHdrYr - startHdrYr === 11
|
|
370
|
-
? (parseInt(startHdrYr, 10) + 2).toString() : endHdrYr - startHdrYr === 12
|
|
371
|
-
? (parseInt(startHdrYr, 10) + 3).toString() : startHdrYr;
|
|
372
|
-
if (endHdrYr - startHdrYr === 8) {
|
|
373
|
-
startHdrYr = (parseInt(startHdrYr, 10) - 1).toString();
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
if (this.calendarInstance.nextIconClicked) {
|
|
377
|
-
for (let i: number = 0; i <= splityear.length; i++) {
|
|
378
|
-
if (startHdrYr - splityear[i as number] === 0 || splityear[i as number] - startHdrYr === 0) {
|
|
379
|
-
startHdrYr = (parseInt(startHdrYr, 10) + 1).toString();
|
|
380
|
-
}
|
|
381
|
-
if (startHdrYr - splityear[i as number] === 2 && startHdrYr > splityear[i as number].trim()) {
|
|
382
|
-
startHdrYr = (parseInt(startHdrYr, 10) - 1).toString();
|
|
383
|
-
}
|
|
384
|
-
if (splityear[i as number] - startHdrYr === 1 && startHdrYr < splityear[i as number].trim()) {
|
|
385
|
-
startHdrYr = (parseInt(startHdrYr, 10) + 2).toString();
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
if (startHdrYr - this.calendarInstance.headerTitleElement.textContent.split('-')[1].trim() > 1) {
|
|
389
|
-
startHdrYr = (parseInt(this.calendarInstance.headerTitleElement.textContent.split('-')[1].trim(), 10) + 1).toString();
|
|
390
|
-
endHdrYr = (parseInt(startHdrYr, 10) + 9).toString();
|
|
391
|
-
}
|
|
392
|
-
endHdrYr = endHdrYr - startHdrYr === 10 ? (parseInt(endHdrYr, 10) - 1).toString() : endHdrYr;
|
|
393
|
-
endHdrYr = endHdrYr - startHdrYr === 7
|
|
394
|
-
? (parseInt(endHdrYr, 10) + 2).toString() : endHdrYr - startHdrYr === 8
|
|
395
|
-
? (parseInt(endHdrYr, 10) + 1).toString() : endHdrYr;
|
|
396
|
-
}
|
|
397
|
-
if (this.calendarInstance.locale === 'ar'){
|
|
398
|
-
const startHeaderYear: any =
|
|
399
|
-
this.calendarInstance.globalize.formatDate(startYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
|
|
400
|
-
const endHeaderYear: any =
|
|
401
|
-
this.calendarInstance.globalize.formatDate(endYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
|
|
402
|
-
this.calendarInstance.headerTitleElement.textContent = startHeaderYear + ' - ' + (endHeaderYear);
|
|
403
|
-
} else {
|
|
404
|
-
this.calendarInstance.headerTitleElement.textContent = startHdrYr + ' - ' + (endHdrYr);
|
|
405
|
-
}
|
|
406
|
-
this.calendarInstance.nextIconClicked = this.calendarInstance.previousIconClicked = false;
|
|
407
|
-
const year: any = (parseInt(startHdrYr, 10) - 2).toString();
|
|
408
|
-
startFullYr = Math.round(parseInt(startHdrYr, 10) * 0.97 + 622);
|
|
409
|
-
endFullYr = Math.round(parseInt(endHdrYr, 10) * 0.97 + 622);
|
|
410
|
-
const startYear: number = Math.round(parseInt(year, 10) * 0.97 + 622);
|
|
411
|
-
for (let rowCount: number = 1; rowCount <= yearCell; ++rowCount) {
|
|
412
|
-
const year: number = startYear + rowCount;
|
|
413
|
-
localDate.setFullYear(year);
|
|
414
|
-
localDate.setDate(1);
|
|
415
|
-
localDate.setMonth(0);
|
|
416
|
-
if ((this.getIslamicDate(localDate).year - islamicDate.year) > 1) {
|
|
417
|
-
localDate.setMonth(1);
|
|
418
|
-
rowCount = rowCount - 1;
|
|
419
|
-
localDate.setFullYear(localDate.getFullYear() - 1);
|
|
420
|
-
}
|
|
421
|
-
islamicDate = this.getIslamicDate(localDate);
|
|
422
|
-
const gregorianObject: Date = HijriParser.toGregorian(islamicDate.year, 1, 1);
|
|
423
|
-
localDate = gregorianObject;
|
|
424
|
-
if (islamicDate.year === parseInt(startHdrYr, 10) - 1 || islamicDate.year >= startHdrYr &&
|
|
425
|
-
islamicDate.year <= endFullYr || islamicDate.year === parseInt(endHdrYr, 10) + 1) {
|
|
426
|
-
const tdEle: HTMLElement = this.islamicDayCell(localDate);
|
|
427
|
-
attributes(tdEle, { 'role': 'gridcell' });
|
|
428
|
-
const dayLink: HTMLElement = this.calendarInstance.createElement('span');
|
|
429
|
-
dayLink.textContent = this.calendarInstance.globalize.formatDate(
|
|
430
|
-
localDate, { type: 'dateTime', format: 'y', calendar: 'islamic' });
|
|
431
|
-
if (islamicDate.year === parseInt(startHdrYr, 10) - 1 || (year < startFullYr) ||
|
|
432
|
-
(year > endFullYr) && islamicDate.year !== parseInt(endHdrYr, 10)) {
|
|
433
|
-
addClass([tdEle], OTHERMONTH);
|
|
434
|
-
if (year <= new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
|
|
435
|
-
|| year >= new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()) {
|
|
436
|
-
addClass([tdEle], DISABLED);
|
|
437
|
-
}
|
|
438
|
-
} else if (year < new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
|
|
439
|
-
|| year > new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()) {
|
|
440
|
-
addClass([tdEle], DISABLED);
|
|
441
|
-
} else if (!isNullOrUndefined(value) &&
|
|
442
|
-
(<any>(this.getIslamicDate(localDate))).year ===
|
|
443
|
-
(<any>(this.getIslamicDate(value))).year) {
|
|
444
|
-
addClass([tdEle], SELECTED);
|
|
445
|
-
} else {
|
|
446
|
-
if (this.getIslamicDate(localDate).year === this.getIslamicDate(this.calendarInstance.currentDate).year &&
|
|
447
|
-
!tdEle.classList.contains(DISABLED)) {
|
|
448
|
-
addClass([tdEle], FOCUSEDDATE);
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
if (!tdEle.classList.contains(DISABLED)) {
|
|
452
|
-
EventHandler.add(tdEle, 'click', this.calendarInstance.clickHandler, this.calendarInstance);
|
|
453
|
-
}
|
|
454
|
-
tdEle.appendChild(dayLink);
|
|
455
|
-
if ((!isNullOrUndefined(e) && (e as KeyboardEventArgs).action === 'home' && islamicDate.year.toString() === startHdrYr) || (!isNullOrUndefined(e) && (e as KeyboardEventArgs).action === 'end' && islamicDate.year.toString() === endHdrYr)) {
|
|
456
|
-
addClass([tdEle], FOCUSEDDATE);
|
|
457
|
-
}
|
|
458
|
-
tdEles.push(tdEle); }
|
|
459
|
-
}
|
|
460
|
-
this.islamicRenderTemplate(tdEles, numCells, 'e-decade', e, value);
|
|
461
|
-
}
|
|
462
|
-
public islamicDayCell(localDate: Date): HTMLElement {
|
|
463
|
-
const dateFormatOptions: object = { skeleton: 'full', type: 'dateTime', calendar: 'islamic' };
|
|
464
|
-
const formatDate: string = this.calendarInstance.globalize.formatDate(localDate, dateFormatOptions);
|
|
465
|
-
const date: Date = this.calendarInstance.globalize.parseDate(formatDate, dateFormatOptions);
|
|
466
|
-
const value: number = date.valueOf();
|
|
467
|
-
const attrs: Object = {
|
|
468
|
-
className: CELL, attrs: { 'id': '' + getUniqueID('' + value), 'aria-selected': 'false', 'role': 'gridcell' }
|
|
469
|
-
};
|
|
470
|
-
return this.calendarInstance.createElement('td', attrs);
|
|
471
|
-
}
|
|
472
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
473
|
-
public islamicRenderTemplate(elements: HTMLElement[], count: number, classNm: string, e?: Event, value?: Date): void {
|
|
474
|
-
const view: number = this.calendarInstance.getViewNumber(this.calendarInstance.currentView());
|
|
475
|
-
let trEle: HTMLElement;
|
|
476
|
-
this.calendarInstance.tableBodyElement = this.calendarInstance.createElement('tbody');
|
|
477
|
-
this.calendarInstance.table.appendChild(this.calendarInstance.tableBodyElement);
|
|
478
|
-
removeClass([this.calendarInstance.contentElement, this.calendarInstance.headerElement], [MONTH, DECADE, YEAR]);
|
|
479
|
-
addClass([this.calendarInstance.contentElement, this.calendarInstance.headerElement], [classNm]);
|
|
480
|
-
const weekNumCell: number = 41;
|
|
481
|
-
const numberCell: number = 35;
|
|
482
|
-
const otherMonthCell: number = 6;
|
|
483
|
-
let row: number = count;
|
|
484
|
-
let rowCount: number = 0;
|
|
485
|
-
for (let dayCell: number = 0; dayCell < Math.round(elements.length / count); ++dayCell) {
|
|
486
|
-
trEle = this.calendarInstance.createElement('tr', { attrs: { 'role': 'row' } });
|
|
487
|
-
for (rowCount = 0 + rowCount; rowCount < row; rowCount++) {
|
|
488
|
-
if (!elements[rowCount as number].classList.contains('e-week-number') && !isNullOrUndefined(elements[rowCount as number].children[0])) {
|
|
489
|
-
addClass([elements[rowCount as number].children[0]], [LINK]);
|
|
490
|
-
rippleEffect(<HTMLElement>elements[rowCount as number].children[0], {
|
|
491
|
-
duration: 600,
|
|
492
|
-
isCenterRipple: true
|
|
493
|
-
});
|
|
494
|
-
}
|
|
495
|
-
trEle.appendChild(elements[rowCount as number]);
|
|
496
|
-
if (this.calendarInstance.weekNumber &&
|
|
497
|
-
rowCount === otherMonthCell + 1 && elements[otherMonthCell + 1].classList.contains(OTHERMONTH)) {
|
|
498
|
-
addClass([trEle], OTHERMONTHROW);
|
|
499
|
-
}
|
|
500
|
-
if (!this.calendarInstance.weekNumber
|
|
501
|
-
&& rowCount === otherMonthCell && elements[otherMonthCell as number].classList.contains(OTHERMONTH)) {
|
|
502
|
-
addClass([trEle], OTHERMONTHROW);
|
|
503
|
-
}
|
|
504
|
-
if (this.calendarInstance.weekNumber) {
|
|
505
|
-
if (rowCount === weekNumCell && elements[weekNumCell as number].classList.contains(OTHERMONTH)) {
|
|
506
|
-
addClass([trEle], OTHERMONTHROW);
|
|
507
|
-
}
|
|
508
|
-
} else {
|
|
509
|
-
if (rowCount === numberCell && elements[numberCell as number].classList.contains(OTHERMONTH)) {
|
|
510
|
-
addClass([trEle], OTHERMONTHROW);
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
row = row + count;
|
|
515
|
-
rowCount = rowCount + 0;
|
|
516
|
-
this.calendarInstance.tableBodyElement.appendChild(trEle);
|
|
517
|
-
}
|
|
518
|
-
this.calendarInstance.table.querySelector('tbody').className = this.calendarInstance.effect;
|
|
519
|
-
this.islamicIconHandler();
|
|
520
|
-
|
|
521
|
-
if (view !== this.calendarInstance.getViewNumber(this.calendarInstance.currentView())
|
|
522
|
-
|| (view === 0 && view !== this.calendarInstance.getViewNumber(this.calendarInstance.currentView()))) {
|
|
523
|
-
this.calendarInstance.navigateHandler(e);
|
|
524
|
-
}
|
|
525
|
-
this.calendarInstance.setAriaActiveDescendant();
|
|
526
|
-
this.calendarInstance.changedArgs = { value: this.calendarInstance.value, values: this.calendarInstance.values };
|
|
527
|
-
this.calendarInstance.changeHandler();
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
public islamicCompareMonth(start: Date, end: Date): number {
|
|
531
|
-
const hijriStart: any = <any>(this.getIslamicDate(start));
|
|
532
|
-
const hijriEnd: any = <any>(this.getIslamicDate(end));
|
|
533
|
-
let result: number;
|
|
534
|
-
if (hijriStart.year > hijriEnd.year) {
|
|
535
|
-
result = 1;
|
|
536
|
-
} else if (hijriStart.year < hijriEnd.year) {
|
|
537
|
-
result = -1;
|
|
538
|
-
} else {
|
|
539
|
-
result = hijriStart.month === hijriEnd.month ? 0 : hijriStart.month > hijriEnd.month ? 1 : -1;
|
|
540
|
-
}
|
|
541
|
-
return result;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
public islamicCompare(startDate: Date, endDate: Date, modifier: number): number {
|
|
545
|
-
const hijriStart: any = <any>this.getIslamicDate(startDate);
|
|
546
|
-
const hijriEnd: any = <any>this.getIslamicDate(endDate);
|
|
547
|
-
let start: number = hijriEnd.year;
|
|
548
|
-
let end: number;
|
|
549
|
-
let result: number;
|
|
550
|
-
end = start;
|
|
551
|
-
result = 0;
|
|
552
|
-
if (modifier) {
|
|
553
|
-
start = start - start % modifier;
|
|
554
|
-
end = start - start % modifier + modifier - 1;
|
|
555
|
-
}
|
|
556
|
-
if (hijriStart.year > end) {
|
|
557
|
-
result = 1;
|
|
558
|
-
} else if ((this.calendarInstance.currentView() === 'Decade') && hijriStart.year < start &&
|
|
559
|
-
!((startDate.getFullYear() >= minDecade && startDate.getFullYear() <= maxDecade))) {
|
|
560
|
-
result = -1;
|
|
561
|
-
} else if (hijriStart.year < start && (this.calendarInstance.currentView() === 'Year')) {
|
|
562
|
-
result = -1;
|
|
563
|
-
}
|
|
564
|
-
return result;
|
|
565
|
-
}
|
|
566
|
-
public getIslamicDate(date: Date): any {
|
|
567
|
-
return <any>(HijriParser.getHijriDate(date));
|
|
568
|
-
}
|
|
569
|
-
public toGregorian(year: number, month: number, date: number): Date {
|
|
570
|
-
return HijriParser.toGregorian(year, month, date);
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
public hijriCompareYear(start: Date, end: Date): number {
|
|
574
|
-
return this.islamicCompare(start, end, 0);
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
public hijriCompareDecade(start: Date, end: Date): number {
|
|
578
|
-
return this.islamicCompare(start, end, 10);
|
|
579
|
-
|
|
580
|
-
}
|
|
581
|
-
public destroy(): void {
|
|
582
|
-
this.calendarInstance = null;
|
|
583
|
-
}
|
|
584
|
-
protected islamicInValue(inValue: string | Date | number): string {
|
|
585
|
-
if (inValue instanceof Date) {
|
|
586
|
-
return (inValue.toUTCString());
|
|
587
|
-
} else {
|
|
588
|
-
return ('' + inValue);
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
export interface IslamicDateArgs {
|
|
593
|
-
year: number
|
|
594
|
-
date: number
|
|
595
|
-
month: number
|
|
596
|
-
}
|
|
597
|
-
/* eslint-enable @typescript-eslint/no-explicit-any */
|