@syncfusion/ej2-schedule 26.1.41 → 26.2.4

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.
@@ -4133,6 +4133,9 @@ function weeklyType(startDate, endDate, data, ruleObject) {
4133
4133
  }
4134
4134
  else {
4135
4135
  tempDate = getStartDateForWeek(startDate, ruleObject.day);
4136
+ if (interval > 1 && dayIndex.indexOf(ruleObject.day[0]) < startDate.getDay()) {
4137
+ tempDate.setDate(tempDate.getDate() + ((interval - 1) * 7));
4138
+ }
4136
4139
  while (compareDates(tempDate, endDate)) {
4137
4140
  weekState = validateRules(tempDate, ruleObject);
4138
4141
  if (weekState && (expectedDays.indexOf(DAYINDEX[tempDate.getDay()]) > -1)) {
@@ -11984,8 +11987,13 @@ class EventWindow {
11984
11987
  this.addEventHandlers();
11985
11988
  }
11986
11989
  if (!isNullOrUndefined(this.parent.editorTemplate)) {
11987
- this.renderFormElements(this.element.querySelector('.e-schedule-form'), data);
11990
+ this.renderFormElements(this.element.querySelector('.e-schedule-form'), data, type, repeatType);
11991
+ }
11992
+ else {
11993
+ this.setEditorContent(data, type, repeatType);
11988
11994
  }
11995
+ }
11996
+ setEditorContent(data, type, repeatType) {
11989
11997
  if (!this.parent.isAdaptive && isNullOrUndefined(this.parent.editorTemplate)) {
11990
11998
  removeClass([this.dialogObject.element.querySelector('.e-recurrenceeditor')], DISABLE_CLASS);
11991
11999
  }
@@ -12164,7 +12172,7 @@ class EventWindow {
12164
12172
  container.appendChild(form);
12165
12173
  return container;
12166
12174
  }
12167
- renderFormElements(form, args) {
12175
+ renderFormElements(form, args, type, repeatType) {
12168
12176
  if (!isNullOrUndefined(this.parent.editorTemplate)) {
12169
12177
  if (args) {
12170
12178
  if (this.fieldValidator) {
@@ -12191,15 +12199,17 @@ class EventWindow {
12191
12199
  this.parent.renderTemplates(() => {
12192
12200
  if (this.element) {
12193
12201
  this.applyFormValidation();
12194
- if (this.eventCrudData) {
12195
- this.showDetails(this.eventCrudData);
12196
- this.eventCrudData = null;
12202
+ if (args) {
12203
+ this.setEditorContent(args, type, repeatType);
12197
12204
  }
12198
12205
  }
12199
12206
  });
12200
12207
  }
12201
12208
  else {
12202
12209
  form.appendChild(this.getDefaultEventWindowContent());
12210
+ if (args) {
12211
+ this.setEditorContent(args, type, repeatType);
12212
+ }
12203
12213
  }
12204
12214
  }
12205
12215
  getDefaultEventWindowContent() {
@@ -12785,13 +12795,9 @@ class EventWindow {
12785
12795
  this.fieldValidator.renderFormValidator(form, rules, this.element, this.parent.locale);
12786
12796
  }
12787
12797
  showDetails(eventData) {
12788
- this.eventData = this.eventCrudData ? this.eventData : eventData;
12798
+ this.eventData = eventData;
12789
12799
  const eventObj = extend({}, eventData, null, true);
12790
12800
  const formElements = this.getFormElements(EVENT_WINDOW_DIALOG_CLASS);
12791
- if (this.parent.isReact && formElements.length < 1 && !this.cellClickAction) {
12792
- this.eventCrudData = eventObj;
12793
- return;
12794
- }
12795
12801
  if ((!this.cellClickAction || this.cellClickAction && !isNullOrUndefined(this.parent.editorTemplate)) &&
12796
12802
  eventObj[this.fields.endTime].getHours() === 0 && eventObj[this.fields.endTime].getMinutes() === 0) {
12797
12803
  this.trimAllDay(eventObj);
@@ -22406,7 +22412,7 @@ class DragAndDrop extends ActionBase {
22406
22412
  getUniversalTime(eventObj[this.parent.eventFields.startTime]);
22407
22413
  let offsetLeft = this.parent.enableRtl ? Math.abs(this.actionObj.clone.offsetLeft) - this.actionObj.clone.offsetWidth :
22408
22414
  parseInt(this.actionObj.clone.style.left, 10);
22409
- offsetLeft = Math.floor(offsetLeft / Math.trunc(this.actionObj.cellWidth)) * this.actionObj.cellWidth;
22415
+ offsetLeft = Math.round(offsetLeft / this.actionObj.cellWidth) * this.actionObj.cellWidth;
22410
22416
  let rightOffset;
22411
22417
  if (this.parent.enableRtl) {
22412
22418
  rightOffset = Math.abs(parseInt(this.actionObj.clone.style.right, 10));
@@ -22592,7 +22598,7 @@ class DragAndDrop extends ActionBase {
22592
22598
  return 0;
22593
22599
  }
22594
22600
  getColumnIndex(offsetLeft) {
22595
- const index = Math.floor(offsetLeft / Math.trunc(this.actionObj.cellWidth));
22601
+ const index = Math.round(offsetLeft / this.actionObj.cellWidth);
22596
22602
  if (this.isHeaderRows) {
22597
22603
  return index;
22598
22604
  }
@@ -23668,7 +23674,11 @@ class VerticalView extends ViewBase {
23668
23674
  curTimeWrap[parseInt(i.toString(), 10)].appendChild(createElement('div', { className: PREVIOUS_TIMELINE_CLASS, styles: 'top:' + topInPx }));
23669
23675
  }
23670
23676
  for (const day of currentDateIndex) {
23671
- curTimeWrap[parseInt(day.toString(), 10)].appendChild(createElement('div', { className: CURRENT_TIMELINE_CLASS, styles: 'top:' + topInPx }));
23677
+ if (curTimeWrap.length > day) {
23678
+ curTimeWrap[parseInt(day.toString(), 10)].appendChild(createElement('div', {
23679
+ className: CURRENT_TIMELINE_CLASS, styles: 'top:' + topInPx
23680
+ }));
23681
+ }
23672
23682
  }
23673
23683
  const currentTimeEle = createElement('div', {
23674
23684
  innerHTML: this.parent.getTimeString(this.parent.getCurrentTime()),