@syncfusion/ej2-schedule 19.4.38 → 19.4.43

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +30 -2
  2. package/dist/ej2-schedule.umd.min.js +2 -2
  3. package/dist/ej2-schedule.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-schedule.es2015.js +74 -52
  5. package/dist/es6/ej2-schedule.es2015.js.map +1 -1
  6. package/dist/es6/ej2-schedule.es5.js +74 -52
  7. package/dist/es6/ej2-schedule.es5.js.map +1 -1
  8. package/dist/global/ej2-schedule.min.js +2 -2
  9. package/dist/global/ej2-schedule.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +13 -13
  12. package/src/schedule/actions/drag.js +2 -2
  13. package/src/schedule/actions/resize.js +44 -37
  14. package/src/schedule/base/css-constant.d.ts +6 -0
  15. package/src/schedule/base/css-constant.js +6 -0
  16. package/src/schedule/base/schedule.js +1 -1
  17. package/src/schedule/event-renderer/event-base.d.ts +1 -1
  18. package/src/schedule/event-renderer/event-base.js +2 -3
  19. package/src/schedule/event-renderer/month.js +2 -1
  20. package/src/schedule/renderer/header-renderer.js +3 -2
  21. package/src/schedule/renderer/month.js +2 -1
  22. package/src/schedule/renderer/renderer.js +6 -1
  23. package/src/schedule/renderer/timeline-year.js +1 -1
  24. package/src/schedule/renderer/view-base.js +5 -3
  25. package/styles/bootstrap-dark.css +4 -0
  26. package/styles/bootstrap.css +4 -0
  27. package/styles/bootstrap4.css +4 -0
  28. package/styles/bootstrap5-dark.css +4 -0
  29. package/styles/bootstrap5.css +4 -0
  30. package/styles/fabric-dark.css +4 -0
  31. package/styles/fabric.css +4 -0
  32. package/styles/highcontrast-light.css +4 -0
  33. package/styles/highcontrast.css +4 -0
  34. package/styles/material-dark.css +4 -0
  35. package/styles/material.css +4 -0
  36. package/styles/schedule/_layout.scss +4 -0
  37. package/styles/schedule/bootstrap-dark.css +4 -0
  38. package/styles/schedule/bootstrap.css +4 -0
  39. package/styles/schedule/bootstrap4.css +4 -0
  40. package/styles/schedule/bootstrap5-dark.css +4 -0
  41. package/styles/schedule/bootstrap5.css +4 -0
  42. package/styles/schedule/fabric-dark.css +4 -0
  43. package/styles/schedule/fabric.css +4 -0
  44. package/styles/schedule/highcontrast-light.css +4 -0
  45. package/styles/schedule/highcontrast.css +4 -0
  46. package/styles/schedule/material-dark.css +4 -0
  47. package/styles/schedule/material.css +4 -0
  48. package/styles/schedule/tailwind-dark.css +4 -0
  49. package/styles/schedule/tailwind.css +4 -0
  50. package/styles/tailwind-dark.css +4 -0
  51. package/styles/tailwind.css +4 -0
@@ -514,6 +514,12 @@ const DATE_HEADER_CONTAINER_CLASS = 'e-date-header-container';
514
514
  /** @private */
515
515
  const HEADER_CELLS_CLASS = 'e-header-cells';
516
516
  /** @private */
517
+ const HEADER_WEEK_CELLS_CLASS = 'e-header-week-cell';
518
+ /** @private */
519
+ const HEADER_MONTH_CELLS_CLASS = 'e-header-month-cell';
520
+ /** @private */
521
+ const HEADER_YEAR_CELLS_CLASS = 'e-header-year-cell';
522
+ /** @private */
517
523
  const WORKDAY_CLASS = 'e-work-days';
518
524
  /** @private */
519
525
  const OTHERMONTH_CLASS = 'e-other-month';
@@ -1286,6 +1292,7 @@ class HeaderRenderer {
1286
1292
  const strClass = args.item.cssClass.replace('e-views ', '');
1287
1293
  let data;
1288
1294
  let isSameTime;
1295
+ let currentTime;
1289
1296
  switch (strClass) {
1290
1297
  case 'e-date-range':
1291
1298
  if (!this.headerPopup) {
@@ -1335,8 +1342,8 @@ class HeaderRenderer {
1335
1342
  this.parent.changeView('TimelineYear', args.originalEvent, undefined, this.calculateViewIndex(args));
1336
1343
  break;
1337
1344
  case 'e-today':
1338
- const currentTime = resetTime(this.parent.getCurrentTime());
1339
- if (this.parent.currentView === 'Agenda' || !this.parent.isSelectedDate(currentTime) ||
1345
+ currentTime = resetTime(this.parent.getCurrentTime());
1346
+ if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda' || !this.parent.isSelectedDate(currentTime) ||
1340
1347
  this.parent.currentView === 'Month' && this.parent.activeViewOptions.displayDate && !this.hasSelectedDate() &&
1341
1348
  resetTime(this.parent.activeViewOptions.displayDate) !== currentTime || this.parent.currentView === 'Month' &&
1342
1349
  this.parent.activeViewOptions.numberOfWeeks > 0 && !this.hasSelectedDate()
@@ -6202,7 +6209,7 @@ class EventBase {
6202
6209
  eventObj[this.parent.eventFields.endTime].getTime() < schedule.endHour.getTime() && start.getTime() === end.getTime();
6203
6210
  return isHourRange || isSameRange;
6204
6211
  }
6205
- allDayExpandScroll(dateHeader, heightPropChanged) {
6212
+ allDayExpandScroll(dateHeader) {
6206
6213
  let indentHeight = 0;
6207
6214
  const headerRows = [].slice.call(this.parent.element.querySelectorAll('.' + HEADER_ROW_CLASS));
6208
6215
  headerRows.forEach((element) => {
@@ -6212,8 +6219,7 @@ class EventBase {
6212
6219
  });
6213
6220
  indentHeight = dateHeader.offsetHeight - indentHeight;
6214
6221
  this.parent.element.querySelector('.' + ALLDAY_CELLS_CLASS).style.height = (indentHeight / 12) + 'em';
6215
- const content = this.parent.element.querySelector('.' + CONTENT_WRAP_CLASS);
6216
- if (this.parent.uiStateValues.expand && (content.offsetWidth - content.clientWidth > 0 || heightPropChanged || this.parent.element.classList.contains(DEVICE_CLASS))) {
6222
+ if (this.parent.uiStateValues.expand) {
6217
6223
  addClass([dateHeader], ALLDAY_APPOINTMENT_SCROLL);
6218
6224
  }
6219
6225
  else {
@@ -7179,7 +7185,8 @@ class MonthEvent extends EventBase {
7179
7185
  setStyleAttribute(cell, { 'height': height + 'px' });
7180
7186
  });
7181
7187
  }
7182
- const cellDetail = this.workCells.slice(-1)[0].getBoundingClientRect();
7188
+ const cellDetail = this.workCells[this.parent.activeView.isTimelineView() ?
7189
+ 0 : this.workCells.length - 1].getBoundingClientRect();
7183
7190
  this.cellWidth = cellDetail.width;
7184
7191
  this.cellHeight = cellDetail.height;
7185
7192
  this.dateRender = dateRender;
@@ -13066,7 +13073,12 @@ class Render {
13066
13073
  }
13067
13074
  initializeLayout(viewName) {
13068
13075
  if (this.parent.activeView) {
13069
- this.parent.resetTemplates();
13076
+ const templates = [
13077
+ 'cellTemplate', 'eventTemplate', 'tooltipTemplate', 'majorSlotTemplate', 'minorSlotTemplate',
13078
+ 'headerTooltipTemplate', 'dateHeaderTemplate', 'dayHeaderTemplate', 'mothHeaderTemplate',
13079
+ 'headerIndentTemplate', 'resourceHeaderTemplate', 'cellHeaderTemplate'
13080
+ ];
13081
+ this.parent.resetTemplates(templates);
13070
13082
  this.parent.activeView.removeEventListener();
13071
13083
  this.parent.activeView.destroy();
13072
13084
  }
@@ -16591,7 +16603,7 @@ let Schedule = class Schedule extends Component {
16591
16603
  if (dateHeader.classList.contains(ALLDAY_APPOINTMENT_AUTO)) {
16592
16604
  removeClass([dateHeader], ALLDAY_APPOINTMENT_AUTO);
16593
16605
  }
16594
- this.eventBase.allDayExpandScroll(dateHeader, true);
16606
+ this.eventBase.allDayExpandScroll(dateHeader);
16595
16607
  }
16596
16608
  if (!this.uiStateValues.expand) {
16597
16609
  allDayRow.style.height = '';
@@ -18400,9 +18412,9 @@ class Resize extends ActionBase {
18400
18412
  bottom: resizeTarget.classList.contains(BOTTOM_RESIZE_HANDLER)
18401
18413
  };
18402
18414
  this.actionObj.groupIndex = this.parent.uiStateValues.isGroupAdaptive ? this.parent.uiStateValues.groupIndex : 0;
18403
- const workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS);
18404
- this.actionObj.cellWidth = workCell.offsetWidth;
18405
- this.actionObj.cellHeight = workCell.offsetHeight;
18415
+ const workCell = this.parent.element.querySelector('.' + WORK_CELLS_CLASS).getBoundingClientRect();
18416
+ this.actionObj.cellWidth = workCell.width;
18417
+ this.actionObj.cellHeight = workCell.height;
18406
18418
  const hRows = this.parent.activeViewOptions.headerRows.map((row) => row.option);
18407
18419
  if (this.parent.activeView.isTimelineView() && hRows.length > 0 && ['Date', 'Hour'].indexOf(hRows.slice(-1)[0]) < 0) {
18408
18420
  const tr = this.parent.getContentTable().querySelector('tr');
@@ -18411,8 +18423,9 @@ class Resize extends ActionBase {
18411
18423
  for (const td of tdCollections) {
18412
18424
  noOfDays += parseInt(td.getAttribute('colspan'), 10);
18413
18425
  }
18414
- this.actionObj.cellWidth = tr.offsetWidth / noOfDays;
18415
- this.actionObj.cellHeight = tr.offsetHeight;
18426
+ const trRect = tr.getBoundingClientRect();
18427
+ this.actionObj.cellWidth = trRect.width / noOfDays;
18428
+ this.actionObj.cellHeight = trRect.height;
18416
18429
  }
18417
18430
  const pages = this.getPageCoordinates(e);
18418
18431
  this.actionObj.X = pages.pageX;
@@ -18657,12 +18670,12 @@ class Resize extends ActionBase {
18657
18670
  const eventEnd = new Date(this.actionObj.event[this.parent.eventFields.endTime].getTime());
18658
18671
  let resizeTime;
18659
18672
  let isDateHeader = false;
18673
+ let headerName = this.parent.currentView;
18660
18674
  const isTimeViews = ['TimelineDay', 'TimelineWeek', 'TimelineWorkWeek'].indexOf(this.parent.currentView) > -1;
18661
18675
  const isTimelineMonth = this.parent.currentView === 'TimelineMonth';
18662
18676
  const isWithoutScale = isTimelineMonth || isTimeViews && !this.parent.activeViewOptions.timeScale.enable;
18663
18677
  if (this.parent.activeView.isTimelineView()) {
18664
18678
  const tr = this.parent.getContentTable().querySelector('tr');
18665
- let headerName = this.parent.currentView;
18666
18679
  if (this.parent.activeViewOptions.headerRows.length > 0) {
18667
18680
  const rows = this.parent.activeViewOptions.headerRows.map((row) => row.option);
18668
18681
  headerName = rows.slice(-1)[0];
@@ -18674,6 +18687,11 @@ class Resize extends ActionBase {
18674
18687
  let cellIndex = 0;
18675
18688
  const tdCollections = [].slice.call(tr.children);
18676
18689
  let isLastCell = false;
18690
+ const pixelsPerMinute = this.actionObj.cellWidth / (this.parent.activeViewOptions.timeScale.interval /
18691
+ this.parent.activeViewOptions.timeScale.slotCount);
18692
+ let offset = parseFloat(this.parent.enableRtl ? this.actionObj.clone.style.right :
18693
+ this.actionObj.clone.style.left);
18694
+ offset = Math.round(offset / pixelsPerMinute) * pixelsPerMinute;
18677
18695
  if (['Year', 'Month', 'Week', 'Date'].indexOf(headerName) !== -1) {
18678
18696
  let noOfDays = 0;
18679
18697
  for (const td of tdCollections) {
@@ -18681,28 +18699,28 @@ class Resize extends ActionBase {
18681
18699
  }
18682
18700
  let offsetValue = this.parent.enableRtl ? parseInt(this.actionObj.clone.style.right, 10) :
18683
18701
  parseInt(this.actionObj.clone.style.left, 10);
18702
+ offsetValue = Math.round(offsetValue / this.actionObj.cellWidth) * this.actionObj.cellWidth;
18684
18703
  if (!isLeft) {
18685
- offsetValue += (this.actionObj.clone.offsetWidth - this.actionObj.cellWidth);
18704
+ offsetValue += (this.actionObj.clone.getBoundingClientRect().width - this.actionObj.cellWidth);
18686
18705
  }
18687
- cellIndex = Math.floor(offsetValue / Math.floor(tr.offsetWidth / noOfDays));
18706
+ cellIndex = Math.floor(offsetValue / Math.floor(tr.getBoundingClientRect().width / noOfDays));
18688
18707
  isDateHeader = isTimeViews && headerName === 'Date';
18689
- cellIndex = isLeft ? cellIndex : (isTimelineMonth || isDateHeader) ? cellIndex + 1 : cellIndex;
18708
+ cellIndex = isLeft ? cellIndex : isTimelineMonth ? cellIndex + 1 : cellIndex;
18690
18709
  isLastCell = cellIndex === tdCollections.length;
18691
18710
  cellIndex = (cellIndex < 0) ? 0 : (cellIndex >= noOfDays) ? noOfDays - 1 : cellIndex;
18692
18711
  }
18693
18712
  else {
18694
18713
  const cellWidth = this.actionObj.cellWidth;
18695
- cellIndex = isLeft ? Math.floor(this.actionObj.clone.offsetLeft / this.actionObj.cellWidth) :
18696
- Math.ceil((this.actionObj.clone.offsetLeft + (this.actionObj.clone.offsetWidth - cellWidth)) /
18697
- this.actionObj.cellWidth);
18714
+ cellIndex = isLeft ? Math.floor(offset / this.actionObj.cellWidth) :
18715
+ Math.ceil((offset + (this.actionObj.clone.getBoundingClientRect().width - cellWidth)) / this.actionObj.cellWidth);
18698
18716
  if (this.parent.enableRtl) {
18699
18717
  let cellOffsetWidth = 0;
18700
18718
  if (headerName === 'TimelineMonth' || (!this.parent.activeViewOptions.timeScale.enable &&
18701
18719
  !isTimelineMonth)) {
18702
18720
  cellOffsetWidth = this.actionObj.cellWidth;
18703
18721
  }
18704
- const offsetWidth = (Math.floor(parseInt(this.actionObj.clone.style.right, 10) / this.actionObj.cellWidth) *
18705
- this.actionObj.cellWidth) + (isLeft ? 0 : this.actionObj.clone.offsetWidth - cellOffsetWidth);
18722
+ const offsetWidth = (Math.floor(offset / this.actionObj.cellWidth) *
18723
+ this.actionObj.cellWidth) + (isLeft ? 0 : this.actionObj.clone.getBoundingClientRect().width - cellOffsetWidth);
18706
18724
  cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
18707
18725
  }
18708
18726
  isLastCell = cellIndex === tdCollections.length;
@@ -18720,13 +18738,11 @@ class Resize extends ActionBase {
18720
18738
  resizeTime = new Date(resizeDate.setHours(resizeTime.getHours(), resizeTime.getMinutes(), resizeTime.getSeconds()));
18721
18739
  }
18722
18740
  else {
18723
- let offsetValue = this.parent.enableRtl ? parseFloat(this.actionObj.clone.style.right) :
18724
- parseFloat(this.actionObj.clone.style.left);
18725
18741
  if (!isLeft) {
18726
- offsetValue += this.actionObj.clone.offsetWidth;
18742
+ offset += this.actionObj.clone.getBoundingClientRect().width;
18727
18743
  }
18728
18744
  let spanMinutes = Math.ceil((this.actionObj.slotInterval / this.actionObj.cellWidth) *
18729
- (offsetValue - Math.floor(offsetValue / this.actionObj.cellWidth) * this.actionObj.cellWidth));
18745
+ (offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
18730
18746
  spanMinutes = (isLastCell || (!isLeft && spanMinutes === 0)) ? this.actionObj.slotInterval : spanMinutes;
18731
18747
  resizeTime = new Date(resizeDate.getTime());
18732
18748
  resizeTime.setMinutes(resizeTime.getMinutes() + spanMinutes);
@@ -18735,9 +18751,10 @@ class Resize extends ActionBase {
18735
18751
  }
18736
18752
  else {
18737
18753
  const cloneIndex = closest(this.actionObj.clone, 'td').cellIndex;
18738
- const originalWidth = Math.ceil((isLeft ? this.actionObj.element.offsetWidth : 0) / this.actionObj.cellWidth) *
18739
- this.actionObj.cellWidth;
18740
- const noOfDays = Math.ceil((this.actionObj.clone.offsetWidth - originalWidth) / this.actionObj.cellWidth);
18754
+ const originalWidth = Math.ceil((isLeft ? this.actionObj.element.getBoundingClientRect().width : 0) /
18755
+ this.actionObj.cellWidth) * this.actionObj.cellWidth;
18756
+ const noOfDays = Math.ceil((this.actionObj.clone.getBoundingClientRect().width - originalWidth) /
18757
+ this.actionObj.cellWidth);
18741
18758
  const tr = closest(this.actionObj.clone, 'tr');
18742
18759
  let dayIndex = isLeft ? cloneIndex - noOfDays : cloneIndex + noOfDays - 1;
18743
18760
  dayIndex = this.getIndex(dayIndex);
@@ -18757,8 +18774,8 @@ class Resize extends ActionBase {
18757
18774
  }
18758
18775
  else {
18759
18776
  const isTimeScaleViews = isTimeViews && this.parent.activeViewOptions.timeScale.enable;
18760
- let resizeEnd = ((!isTimeScaleViews || isDateHeader) && resizeTime.getHours() === 0 && resizeTime.getMinutes() === 0) ?
18761
- addDays(resizeTime, 1) : resizeTime;
18777
+ let resizeEnd = ((!isTimeScaleViews || isDateHeader || isTimeViews && ['Week', 'Month', 'Year'].indexOf(headerName) > -1)
18778
+ && resizeTime.getHours() === 0 && resizeTime.getMinutes() === 0) ? addDays(resizeTime, 1) : resizeTime;
18762
18779
  if (isWithoutScale && (resizeEnd.getTime() - eventStart.getTime()) <= 0) {
18763
18780
  resizeEnd = addDays(resetTime(eventStart), 1);
18764
18781
  }
@@ -18795,29 +18812,30 @@ class Resize extends ActionBase {
18795
18812
  const slotInterval = (this.actionObj.cellWidth / this.actionObj.slotInterval) * this.actionObj.interval;
18796
18813
  const pageWidth = isLeft ? (this.actionObj.X - this.actionObj.pageX) : (this.actionObj.pageX - this.actionObj.X);
18797
18814
  const targetWidth = isTimelineView ?
18798
- (this.actionObj.element.offsetWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth :
18799
- this.parent.currentView === 'Month' ? this.actionObj.element.offsetWidth :
18800
- Math.ceil(this.actionObj.element.offsetWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth;
18815
+ (this.actionObj.element.getBoundingClientRect().width / this.actionObj.cellWidth) * this.actionObj.cellWidth :
18816
+ this.parent.currentView === 'Month' ? this.actionObj.element.getBoundingClientRect().width :
18817
+ Math.ceil(this.actionObj.element.getBoundingClientRect().width / this.actionObj.cellWidth) * this.actionObj.cellWidth;
18801
18818
  let offsetWidth = targetWidth + (Math.ceil(pageWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth);
18819
+ const left = (this.parent.enableRtl) ? parseInt(this.actionObj.element.style.right, 10) : this.actionObj.clone.offsetLeft;
18802
18820
  if (isTimeViews) {
18803
- offsetWidth = targetWidth + (isLeft ? (Math.ceil(pageWidth / slotInterval) * slotInterval) :
18804
- (Math.floor(pageWidth / slotInterval) * slotInterval));
18821
+ offsetWidth = targetWidth + (Math.ceil(pageWidth / slotInterval) * slotInterval);
18822
+ offsetWidth = (Math.round((left + offsetWidth) / slotInterval) * slotInterval) - left;
18805
18823
  this.actionObj.event[this.parent.eventFields.isAllDay] = false;
18806
18824
  }
18807
18825
  let width = !isLeft && ((offsetWidth + this.actionObj.clone.offsetLeft > this.scrollArgs.width)) ?
18808
- this.actionObj.clone.offsetWidth : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
18826
+ this.actionObj.clone.getBoundingClientRect().width : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
18809
18827
  if (this.parent.enableRtl) {
18810
18828
  let rightValue = isTimelineView ? parseInt(this.actionObj.element.style.right, 10) :
18811
18829
  -(offsetWidth - this.actionObj.cellWidth);
18812
18830
  rightValue = isTimelineView ? rightValue : isLeft ? 0 : rightValue > 0 ? 0 : rightValue;
18813
18831
  if (isTimelineView && !isLeft) {
18814
- rightValue = Math.ceil((this.actionObj.element.offsetLeft + (this.actionObj.element.offsetWidth +
18832
+ rightValue = Math.ceil((this.actionObj.element.offsetLeft + (this.actionObj.element.getBoundingClientRect().width +
18815
18833
  (this.actionObj.pageX - this.actionObj.X))) / slotInterval) * slotInterval;
18816
18834
  rightValue = rightValue < 0 ? Math.abs(rightValue) : -rightValue;
18817
18835
  }
18818
18836
  rightValue = rightValue >= this.scrollArgs.width ? this.scrollArgs.width - this.actionObj.cellWidth : rightValue;
18819
18837
  styles.right = formatUnit(rightValue);
18820
- width = width + rightValue > this.scrollArgs.width ? this.actionObj.clone.offsetWidth : width;
18838
+ width = width + rightValue > this.scrollArgs.width ? this.actionObj.clone.getBoundingClientRect().width : width;
18821
18839
  }
18822
18840
  else {
18823
18841
  let offsetLeft = isLeft ? this.actionObj.element.offsetLeft - (this.actionObj.X - this.actionObj.pageX) :
@@ -18825,12 +18843,12 @@ class Resize extends ActionBase {
18825
18843
  if (isTimelineView) {
18826
18844
  offsetLeft = isLeft ? offsetLeft : parseInt(this.actionObj.clone.style.left, 10);
18827
18845
  if (this.parent.enableRtl) {
18828
- offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - this.actionObj.clone.offsetWidth) ?
18829
- parseInt(this.actionObj.clone.style.right, 10) : offsetLeft : offsetLeft;
18846
+ offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - this.actionObj.clone.getBoundingClientRect().width)
18847
+ ? parseInt(this.actionObj.clone.style.right, 10) : offsetLeft : offsetLeft;
18830
18848
  }
18831
18849
  else {
18832
- offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + this.actionObj.clone.offsetWidth &&
18833
- this.actionObj.clone.offsetWidth === this.actionObj.cellWidth) ?
18850
+ offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + this.actionObj.clone.getBoundingClientRect().width &&
18851
+ this.actionObj.clone.getBoundingClientRect().width === this.actionObj.cellWidth) ?
18834
18852
  parseInt(this.actionObj.clone.style.left, 10) : offsetLeft : offsetLeft;
18835
18853
  }
18836
18854
  }
@@ -18840,9 +18858,10 @@ class Resize extends ActionBase {
18840
18858
  Math.ceil(Math.abs(offsetLeft) / this.actionObj.cellWidth) * this.actionObj.cellWidth;
18841
18859
  if (offsetLeft < 0) {
18842
18860
  offsetLeft = 0;
18843
- width = this.actionObj.clone.offsetWidth;
18861
+ width = this.actionObj.clone.getBoundingClientRect().width;
18844
18862
  }
18845
- const cloneWidth = Math.ceil(this.actionObj.clone.offsetWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth;
18863
+ const cloneWidth = Math.ceil(this.actionObj.clone.getBoundingClientRect().width / this.actionObj.cellWidth) *
18864
+ this.actionObj.cellWidth;
18846
18865
  if (isLeft) {
18847
18866
  styles.left = formatUnit(isTimelineView ? offsetLeft : isLeft ? leftValue < 0 ? -offsetLeft :
18848
18867
  (Math.ceil((targetWidth - cloneWidth) / this.actionObj.cellWidth) * this.actionObj.cellWidth) : offsetLeft);
@@ -20406,9 +20425,9 @@ class DragAndDrop extends ActionBase {
20406
20425
  if (this.parent.eventDragArea) {
20407
20426
  const targetDate = this.parent.getDateFromElement(e.target);
20408
20427
  if (!isNullOrUndefined(targetDate)) {
20409
- if (!this.parent.activeViewOptions.timeScale.enable || (this.parent.currentView == "TimelineMonth")) {
20428
+ if (!this.parent.activeViewOptions.timeScale.enable || (this.parent.currentView === 'TimelineMonth')) {
20410
20429
  const eventSrt = eventObj[this.parent.eventFields.startTime];
20411
- eventStart = new Date(eventStart.setHours(eventSrt.getHours(), eventSrt.getMinutes(), eventSrt.getSeconds()));
20430
+ eventStart = new Date(targetDate.setHours(eventSrt.getHours(), eventSrt.getMinutes(), eventSrt.getSeconds()));
20412
20431
  }
20413
20432
  else {
20414
20433
  eventStart = targetDate;
@@ -21067,7 +21086,7 @@ class ViewBase {
21067
21086
  if (this.isTimelineView()) {
21068
21087
  const colElements = this.getColElements();
21069
21088
  const contentBody = this.element.querySelector('.' + CONTENT_TABLE_CLASS + ' tbody');
21070
- const colWidth = Math.ceil(contentBody.offsetWidth / (colElements.length / 2));
21089
+ const colWidth = (contentBody.getBoundingClientRect().width / (colElements.length / 2));
21071
21090
  colElements.forEach((col) => setStyleAttribute(col, { 'width': formatUnit(colWidth) }));
21072
21091
  if (content.offsetHeight !== content.clientHeight) {
21073
21092
  const resourceColumn = this.parent.element.querySelector('.' + RESOURCE_COLUMN_WRAP_CLASS);
@@ -21075,9 +21094,11 @@ class ViewBase {
21075
21094
  setStyleAttribute(resourceColumn, { 'height': formatUnit(content.clientHeight) });
21076
21095
  }
21077
21096
  }
21078
- const headerCellElements = [].slice.call(this.element.querySelectorAll('.' + HEADER_CELLS_CLASS));
21097
+ const cssClass = `.${HEADER_CELLS_CLASS},.${TIME_SLOT_CLASS},.${HEADER_WEEK_CELLS_CLASS},.${HEADER_MONTH_CELLS_CLASS},.${HEADER_YEAR_CELLS_CLASS}`;
21098
+ const headerCellElements = [].slice.call(this.element.querySelectorAll(cssClass));
21079
21099
  headerCellElements.forEach((ele) => {
21080
- const headerCellColSpan = parseInt(ele.getAttribute('colspan'), 10);
21100
+ const colSpan = isNullOrUndefined(ele.getAttribute('colspan')) ? '1' : ele.getAttribute('colspan');
21101
+ const headerCellColSpan = parseInt(colSpan, 10);
21081
21102
  setStyleAttribute(ele, { 'width': formatUnit(colWidth * headerCellColSpan) });
21082
21103
  });
21083
21104
  }
@@ -22477,8 +22498,9 @@ class Month extends ViewBase {
22477
22498
  const dates = this.parent.getCurrentViewDates();
22478
22499
  if (dates && dates.length > 0) {
22479
22500
  const selectedTime = resetTime(this.parent.selectedDate).getTime();
22501
+ const weekFirstDate = getWeekFirstDate(dates[dates.length - 1], this.parent.activeViewOptions.firstDayOfWeek);
22480
22502
  return !(selectedTime >= getWeekFirstDate(dates[0], this.parent.activeViewOptions.firstDayOfWeek).getTime() &&
22481
- selectedTime <= addDays(getWeekFirstDate(dates[dates.length - 1], this.parent.activeViewOptions.firstDayOfWeek), 6).getTime());
22503
+ selectedTime <= addDays(weekFirstDate, 6).getTime());
22482
22504
  }
22483
22505
  return false;
22484
22506
  }
@@ -24462,7 +24484,7 @@ class TimelineYear extends Year {
24462
24484
  }
24463
24485
  else {
24464
24486
  if (this.parent.monthHeaderTemplate) {
24465
- append(this.renderDayMonthHeaderTemplate(date, months[column], 'mothHeaderTemplate'), innerTd);
24487
+ append(this.renderDayMonthHeaderTemplate(date, months[column], 'monthHeaderTemplate'), innerTd);
24466
24488
  }
24467
24489
  else {
24468
24490
  innerTd.innerHTML = `<span>${this.getMonthName(date)}</span>`;