@syncfusion/ej2-schedule 20.2.36 → 20.2.38
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/CHANGELOG.md +10 -0
- package/dist/ej2-schedule.umd.min.js +2 -2
- package/dist/ej2-schedule.umd.min.js.map +1 -1
- package/dist/es6/ej2-schedule.es2015.js +51 -20
- package/dist/es6/ej2-schedule.es2015.js.map +1 -1
- package/dist/es6/ej2-schedule.es5.js +50 -19
- package/dist/es6/ej2-schedule.es5.js.map +1 -1
- package/dist/global/ej2-schedule.min.js +2 -2
- package/dist/global/ej2-schedule.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +15 -15
- package/src/schedule/event-renderer/event-base.d.ts +2 -0
- package/src/schedule/event-renderer/event-base.js +16 -0
- package/src/schedule/exports/calendar-export.js +1 -1
- package/src/schedule/exports/calendar-import.js +32 -18
- package/src/schedule/popups/event-window.js +1 -0
- package/styles/fluent-dark.css +13 -13
- package/styles/schedule/fluent-dark.css +13 -13
|
@@ -5966,8 +5966,9 @@ class EventBase {
|
|
|
5966
5966
|
}
|
|
5967
5967
|
}
|
|
5968
5968
|
const occurrenceCollection = [];
|
|
5969
|
-
for (
|
|
5969
|
+
for (let date of dates) {
|
|
5970
5970
|
const clonedObject = extend({}, event, null, true);
|
|
5971
|
+
date = this.getDSTAdjustedTime(date, clonedObject);
|
|
5971
5972
|
clonedObject[this.parent.eventFields.startTime] = new Date(date);
|
|
5972
5973
|
clonedObject[this.parent.eventFields.endTime] = new Date(new Date(date).setMilliseconds(duration));
|
|
5973
5974
|
clonedObject[this.parent.eventFields.recurrenceID] = clonedObject[this.parent.eventFields.id];
|
|
@@ -5978,6 +5979,21 @@ class EventBase {
|
|
|
5978
5979
|
}
|
|
5979
5980
|
return occurrenceCollection;
|
|
5980
5981
|
}
|
|
5982
|
+
getDSTAdjustedTime(date, event) {
|
|
5983
|
+
let occurDate = date;
|
|
5984
|
+
if (this.parent.timezone &&
|
|
5985
|
+
(event[this.parent.eventFields.startTimezone] || event[this.parent.eventFields.endTimezone])) {
|
|
5986
|
+
const eventOffset = this.getDSTDiff(event[this.parent.eventFields.startTime], new Date(date), event[this.parent.eventFields.startTimezone]);
|
|
5987
|
+
const schOffset = this.getDSTDiff(event[this.parent.eventFields.startTime], new Date(date), this.parent.timezone);
|
|
5988
|
+
occurDate = (new Date(date).getTime() - (eventOffset - schOffset) * 60000);
|
|
5989
|
+
}
|
|
5990
|
+
return occurDate;
|
|
5991
|
+
}
|
|
5992
|
+
getDSTDiff(startDate, occurDate, timezone) {
|
|
5993
|
+
const startOffset = this.parent.tzModule.offset(new Date(startDate), timezone);
|
|
5994
|
+
const occurOffset = this.parent.tzModule.offset(new Date(occurDate), timezone);
|
|
5995
|
+
return startOffset - occurOffset;
|
|
5996
|
+
}
|
|
5981
5997
|
getParentEvent(eventObj, isParent = false) {
|
|
5982
5998
|
let parentEvent;
|
|
5983
5999
|
do {
|
|
@@ -11274,6 +11290,7 @@ class EventWindow {
|
|
|
11274
11290
|
setDialogContent() {
|
|
11275
11291
|
this.dialogObject.content = this.getEventWindowContent();
|
|
11276
11292
|
this.dialogObject.dataBind();
|
|
11293
|
+
this.applyFormValidation();
|
|
11277
11294
|
}
|
|
11278
11295
|
preventEventSave(e) {
|
|
11279
11296
|
if (this.parent && !this.parent.allowKeyboardInteraction && e.code === 'Enter') {
|
|
@@ -25144,7 +25161,7 @@ class ICalendarExport {
|
|
|
25144
25161
|
const timeZone = this.parent.timezone || this.parent.tzModule.getLocalTimezoneName();
|
|
25145
25162
|
const fields = this.parent.eventFields;
|
|
25146
25163
|
eventsData.forEach((eventObj) => {
|
|
25147
|
-
let uId = this.parent.eventBase.generateGuid();
|
|
25164
|
+
let uId = eventObj[fields.id] || eventObj.Guid || this.parent.eventBase.generateGuid();
|
|
25148
25165
|
const editedExDate = [];
|
|
25149
25166
|
if (eventObj[fields.recurrenceID]) {
|
|
25150
25167
|
const filter = this.filterEvents(filterCollection, fields.id, eventObj[fields.recurrenceID]);
|
|
@@ -25343,8 +25360,16 @@ class ICalendarImport {
|
|
|
25343
25360
|
break;
|
|
25344
25361
|
case 'UID':
|
|
25345
25362
|
curEvent[uId] = value;
|
|
25346
|
-
|
|
25347
|
-
|
|
25363
|
+
if (typeof (id) == 'number') {
|
|
25364
|
+
curEvent[fields.id] = parseInt(value, 10);
|
|
25365
|
+
if (isNaN(curEvent[fields.id])) {
|
|
25366
|
+
curEvent[fields.id] = id + count;
|
|
25367
|
+
count++;
|
|
25368
|
+
}
|
|
25369
|
+
}
|
|
25370
|
+
else {
|
|
25371
|
+
curEvent[fields.id] = value;
|
|
25372
|
+
}
|
|
25348
25373
|
break;
|
|
25349
25374
|
case 'SUMMARY':
|
|
25350
25375
|
curEvent[fields.subject] = value;
|
|
@@ -25380,6 +25405,10 @@ class ICalendarImport {
|
|
|
25380
25405
|
const appoint = [];
|
|
25381
25406
|
const uId = 'UID';
|
|
25382
25407
|
const fields = this.parent.eventFields;
|
|
25408
|
+
let appointmentIds = [];
|
|
25409
|
+
this.parent.eventsData.forEach((eventObj) => {
|
|
25410
|
+
appointmentIds.push(eventObj[fields.id]);
|
|
25411
|
+
});
|
|
25383
25412
|
app.forEach((eventObj) => {
|
|
25384
25413
|
let parentObj;
|
|
25385
25414
|
let id;
|
|
@@ -25388,24 +25417,26 @@ class ICalendarImport {
|
|
|
25388
25417
|
parentObj = eventObj;
|
|
25389
25418
|
id = eventObj[fields.id];
|
|
25390
25419
|
}
|
|
25391
|
-
|
|
25392
|
-
|
|
25393
|
-
|
|
25394
|
-
|
|
25395
|
-
|
|
25396
|
-
|
|
25397
|
-
|
|
25398
|
-
|
|
25399
|
-
|
|
25400
|
-
|
|
25401
|
-
|
|
25420
|
+
if (appointmentIds.indexOf(eventObj[fields.id]) < 0) {
|
|
25421
|
+
const data = app.filter((data) => data.UID === eventObj[uId]);
|
|
25422
|
+
if (data.length > 1 && isNullOrUndefined(eventObj[fields.recurrenceID])) {
|
|
25423
|
+
for (let i = 0; i < data.length; i++) {
|
|
25424
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
25425
|
+
if (data[i].hasOwnProperty(fields.recurrenceID)) {
|
|
25426
|
+
const exdate = data[i][fields.recurrenceID];
|
|
25427
|
+
data[i][fields.recurrenceID] = id;
|
|
25428
|
+
data[i][fields.recurrenceException] = null;
|
|
25429
|
+
parentObj[fields.recurrenceException] = (isNullOrUndefined(parentObj[fields.recurrenceException])) ?
|
|
25430
|
+
exdate : parentObj[fields.recurrenceException] + ',' + exdate;
|
|
25431
|
+
appoint.push(data[i]);
|
|
25432
|
+
}
|
|
25402
25433
|
}
|
|
25434
|
+
appoint.push(parentObj);
|
|
25435
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
25436
|
+
}
|
|
25437
|
+
else if (!eventObj.hasOwnProperty(fields.recurrenceID)) {
|
|
25438
|
+
appoint.push(eventObj);
|
|
25403
25439
|
}
|
|
25404
|
-
appoint.push(parentObj);
|
|
25405
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
25406
|
-
}
|
|
25407
|
-
else if (!eventObj.hasOwnProperty(fields.recurrenceID)) {
|
|
25408
|
-
appoint.push(eventObj);
|
|
25409
25440
|
}
|
|
25410
25441
|
});
|
|
25411
25442
|
return appoint;
|