@syncfusion/ej2-schedule 19.4.40 → 19.4.41

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.4.40
3
+ * version : 19.4.41
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-schedule@*",
3
- "_id": "@syncfusion/ej2-schedule@19.4.38",
3
+ "_id": "@syncfusion/ej2-schedule@19.4.40",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-V/auIZawH2Be2hOPRsUUlnPXQ4Qa/GL72q3vpSVbxivepGTndVwaW+Py4fzxGs6z+OxizePiDzObIJka7R87Zw==",
5
+ "_integrity": "sha512-ntfr3rJfYEDvgr9W9eWy/lNzRMAmQ9jeqAd/TXKu4bmu96mkyqyfErAeBNI2hSwHpfP/4ABshRKfnM66FVnmhw==",
6
6
  "_location": "/@syncfusion/ej2-schedule",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-schedule",
24
24
  "/@syncfusion/ej2-vue-schedule"
25
25
  ],
26
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-19.4.38.tgz",
27
- "_shasum": "90490419e915c0b9ecb98257f0d08f4000491222",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-schedule/-/ej2-schedule-19.4.40.tgz",
27
+ "_shasum": "d48a66ca331a4aad73850e1b611f34a6bd366b9f",
28
28
  "_spec": "@syncfusion/ej2-schedule@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -39,12 +39,12 @@
39
39
  "@syncfusion/ej2-buttons": "~19.4.38",
40
40
  "@syncfusion/ej2-calendars": "~19.4.38",
41
41
  "@syncfusion/ej2-data": "~19.4.38",
42
- "@syncfusion/ej2-dropdowns": "~19.4.40",
42
+ "@syncfusion/ej2-dropdowns": "~19.4.41",
43
43
  "@syncfusion/ej2-excel-export": "~19.4.38",
44
- "@syncfusion/ej2-inputs": "~19.4.38",
44
+ "@syncfusion/ej2-inputs": "~19.4.41",
45
45
  "@syncfusion/ej2-lists": "~19.4.38",
46
- "@syncfusion/ej2-navigations": "~19.4.40",
47
- "@syncfusion/ej2-popups": "~19.4.38"
46
+ "@syncfusion/ej2-navigations": "~19.4.41",
47
+ "@syncfusion/ej2-popups": "~19.4.41"
48
48
  },
49
49
  "deprecated": false,
50
50
  "description": "Flexible scheduling library with more built-in features and enhanced customization options similar to outlook and google calendar, allowing the users to plan and manage their appointments with efficient data-binding support.",
@@ -81,6 +81,6 @@
81
81
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
82
82
  },
83
83
  "typings": "index.d.ts",
84
- "version": "19.4.40",
84
+ "version": "19.4.41",
85
85
  "sideEffects": false
86
86
  }
@@ -1073,7 +1073,7 @@ var DragAndDrop = /** @class */ (function (_super) {
1073
1073
  if (!isNullOrUndefined(targetDate)) {
1074
1074
  if (!this.parent.activeViewOptions.timeScale.enable || (this.parent.currentView === 'TimelineMonth')) {
1075
1075
  var eventSrt = eventObj[this.parent.eventFields.startTime];
1076
- eventStart = new Date(eventStart.setHours(eventSrt.getHours(), eventSrt.getMinutes(), eventSrt.getSeconds()));
1076
+ eventStart = new Date(targetDate.setHours(eventSrt.getHours(), eventSrt.getMinutes(), eventSrt.getSeconds()));
1077
1077
  }
1078
1078
  else {
1079
1079
  eventStart = targetDate;
@@ -81,9 +81,9 @@ var Resize = /** @class */ (function (_super) {
81
81
  bottom: resizeTarget.classList.contains(cls.BOTTOM_RESIZE_HANDLER)
82
82
  };
83
83
  _this.actionObj.groupIndex = _this.parent.uiStateValues.isGroupAdaptive ? _this.parent.uiStateValues.groupIndex : 0;
84
- var workCell = _this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS);
85
- _this.actionObj.cellWidth = workCell.offsetWidth;
86
- _this.actionObj.cellHeight = workCell.offsetHeight;
84
+ var workCell = _this.parent.element.querySelector('.' + cls.WORK_CELLS_CLASS).getBoundingClientRect();
85
+ _this.actionObj.cellWidth = workCell.width;
86
+ _this.actionObj.cellHeight = workCell.height;
87
87
  var hRows = _this.parent.activeViewOptions.headerRows.map(function (row) { return row.option; });
88
88
  if (_this.parent.activeView.isTimelineView() && hRows.length > 0 && ['Date', 'Hour'].indexOf(hRows.slice(-1)[0]) < 0) {
89
89
  var tr = _this.parent.getContentTable().querySelector('tr');
@@ -93,8 +93,9 @@ var Resize = /** @class */ (function (_super) {
93
93
  var td = tdCollections_1[_i];
94
94
  noOfDays += parseInt(td.getAttribute('colspan'), 10);
95
95
  }
96
- _this.actionObj.cellWidth = tr.offsetWidth / noOfDays;
97
- _this.actionObj.cellHeight = tr.offsetHeight;
96
+ var trRect = tr.getBoundingClientRect();
97
+ _this.actionObj.cellWidth = trRect.width / noOfDays;
98
+ _this.actionObj.cellHeight = trRect.height;
98
99
  }
99
100
  var pages = _this.getPageCoordinates(e);
100
101
  _this.actionObj.X = pages.pageX;
@@ -345,12 +346,12 @@ var Resize = /** @class */ (function (_super) {
345
346
  var eventEnd = new Date(this.actionObj.event[this.parent.eventFields.endTime].getTime());
346
347
  var resizeTime;
347
348
  var isDateHeader = false;
349
+ var headerName = this.parent.currentView;
348
350
  var isTimeViews = ['TimelineDay', 'TimelineWeek', 'TimelineWorkWeek'].indexOf(this.parent.currentView) > -1;
349
351
  var isTimelineMonth = this.parent.currentView === 'TimelineMonth';
350
352
  var isWithoutScale = isTimelineMonth || isTimeViews && !this.parent.activeViewOptions.timeScale.enable;
351
353
  if (this.parent.activeView.isTimelineView()) {
352
354
  var tr = this.parent.getContentTable().querySelector('tr');
353
- var headerName = this.parent.currentView;
354
355
  if (this.parent.activeViewOptions.headerRows.length > 0) {
355
356
  var rows = this.parent.activeViewOptions.headerRows.map(function (row) { return row.option; });
356
357
  headerName = rows.slice(-1)[0];
@@ -362,6 +363,11 @@ var Resize = /** @class */ (function (_super) {
362
363
  var cellIndex = 0;
363
364
  var tdCollections = [].slice.call(tr.children);
364
365
  var isLastCell = false;
366
+ var pixelsPerMinute = this.actionObj.cellWidth / (this.parent.activeViewOptions.timeScale.interval /
367
+ this.parent.activeViewOptions.timeScale.slotCount);
368
+ var offset = parseFloat(this.parent.enableRtl ? this.actionObj.clone.style.right :
369
+ this.actionObj.clone.style.left);
370
+ offset = Math.round(offset / pixelsPerMinute) * pixelsPerMinute;
365
371
  if (['Year', 'Month', 'Week', 'Date'].indexOf(headerName) !== -1) {
366
372
  var noOfDays = 0;
367
373
  for (var _i = 0, tdCollections_2 = tdCollections; _i < tdCollections_2.length; _i++) {
@@ -370,28 +376,28 @@ var Resize = /** @class */ (function (_super) {
370
376
  }
371
377
  var offsetValue = this.parent.enableRtl ? parseInt(this.actionObj.clone.style.right, 10) :
372
378
  parseInt(this.actionObj.clone.style.left, 10);
379
+ offsetValue = Math.round(offsetValue / this.actionObj.cellWidth) * this.actionObj.cellWidth;
373
380
  if (!isLeft) {
374
- offsetValue += (this.actionObj.clone.offsetWidth - this.actionObj.cellWidth);
381
+ offsetValue += (this.actionObj.clone.getBoundingClientRect().width - this.actionObj.cellWidth);
375
382
  }
376
- cellIndex = Math.floor(offsetValue / Math.floor(tr.offsetWidth / noOfDays));
383
+ cellIndex = Math.floor(offsetValue / Math.floor(tr.getBoundingClientRect().width / noOfDays));
377
384
  isDateHeader = isTimeViews && headerName === 'Date';
378
- cellIndex = isLeft ? cellIndex : (isTimelineMonth || isDateHeader) ? cellIndex + 1 : cellIndex;
385
+ cellIndex = isLeft ? cellIndex : isTimelineMonth ? cellIndex + 1 : cellIndex;
379
386
  isLastCell = cellIndex === tdCollections.length;
380
387
  cellIndex = (cellIndex < 0) ? 0 : (cellIndex >= noOfDays) ? noOfDays - 1 : cellIndex;
381
388
  }
382
389
  else {
383
390
  var cellWidth = this.actionObj.cellWidth;
384
- cellIndex = isLeft ? Math.floor(this.actionObj.clone.offsetLeft / this.actionObj.cellWidth) :
385
- Math.ceil((this.actionObj.clone.offsetLeft + (this.actionObj.clone.offsetWidth - cellWidth)) /
386
- this.actionObj.cellWidth);
391
+ cellIndex = isLeft ? Math.floor(offset / this.actionObj.cellWidth) :
392
+ Math.ceil((offset + (this.actionObj.clone.getBoundingClientRect().width - cellWidth)) / this.actionObj.cellWidth);
387
393
  if (this.parent.enableRtl) {
388
394
  var cellOffsetWidth = 0;
389
395
  if (headerName === 'TimelineMonth' || (!this.parent.activeViewOptions.timeScale.enable &&
390
396
  !isTimelineMonth)) {
391
397
  cellOffsetWidth = this.actionObj.cellWidth;
392
398
  }
393
- var offsetWidth = (Math.floor(parseInt(this.actionObj.clone.style.right, 10) / this.actionObj.cellWidth) *
394
- this.actionObj.cellWidth) + (isLeft ? 0 : this.actionObj.clone.offsetWidth - cellOffsetWidth);
399
+ var offsetWidth = (Math.floor(offset / this.actionObj.cellWidth) *
400
+ this.actionObj.cellWidth) + (isLeft ? 0 : this.actionObj.clone.getBoundingClientRect().width - cellOffsetWidth);
395
401
  cellIndex = Math.floor(offsetWidth / this.actionObj.cellWidth);
396
402
  }
397
403
  isLastCell = cellIndex === tdCollections.length;
@@ -409,13 +415,11 @@ var Resize = /** @class */ (function (_super) {
409
415
  resizeTime = new Date(resizeDate.setHours(resizeTime.getHours(), resizeTime.getMinutes(), resizeTime.getSeconds()));
410
416
  }
411
417
  else {
412
- var offsetValue = this.parent.enableRtl ? parseFloat(this.actionObj.clone.style.right) :
413
- parseFloat(this.actionObj.clone.style.left);
414
418
  if (!isLeft) {
415
- offsetValue += this.actionObj.clone.offsetWidth;
419
+ offset += this.actionObj.clone.getBoundingClientRect().width;
416
420
  }
417
421
  var spanMinutes = Math.ceil((this.actionObj.slotInterval / this.actionObj.cellWidth) *
418
- (offsetValue - Math.floor(offsetValue / this.actionObj.cellWidth) * this.actionObj.cellWidth));
422
+ (offset - Math.floor(offset / this.actionObj.cellWidth) * this.actionObj.cellWidth));
419
423
  spanMinutes = (isLastCell || (!isLeft && spanMinutes === 0)) ? this.actionObj.slotInterval : spanMinutes;
420
424
  resizeTime = new Date(resizeDate.getTime());
421
425
  resizeTime.setMinutes(resizeTime.getMinutes() + spanMinutes);
@@ -424,9 +428,10 @@ var Resize = /** @class */ (function (_super) {
424
428
  }
425
429
  else {
426
430
  var cloneIndex = closest(this.actionObj.clone, 'td').cellIndex;
427
- var originalWidth = Math.ceil((isLeft ? this.actionObj.element.offsetWidth : 0) / this.actionObj.cellWidth) *
428
- this.actionObj.cellWidth;
429
- var noOfDays = Math.ceil((this.actionObj.clone.offsetWidth - originalWidth) / this.actionObj.cellWidth);
431
+ var originalWidth = Math.ceil((isLeft ? this.actionObj.element.getBoundingClientRect().width : 0) /
432
+ this.actionObj.cellWidth) * this.actionObj.cellWidth;
433
+ var noOfDays = Math.ceil((this.actionObj.clone.getBoundingClientRect().width - originalWidth) /
434
+ this.actionObj.cellWidth);
430
435
  var tr = closest(this.actionObj.clone, 'tr');
431
436
  var dayIndex = isLeft ? cloneIndex - noOfDays : cloneIndex + noOfDays - 1;
432
437
  dayIndex = this.getIndex(dayIndex);
@@ -446,8 +451,8 @@ var Resize = /** @class */ (function (_super) {
446
451
  }
447
452
  else {
448
453
  var isTimeScaleViews = isTimeViews && this.parent.activeViewOptions.timeScale.enable;
449
- var resizeEnd = ((!isTimeScaleViews || isDateHeader) && resizeTime.getHours() === 0 && resizeTime.getMinutes() === 0) ?
450
- util.addDays(resizeTime, 1) : resizeTime;
454
+ var resizeEnd = ((!isTimeScaleViews || isDateHeader || isTimeViews && ['Week', 'Month', 'Year'].indexOf(headerName) > -1)
455
+ && resizeTime.getHours() === 0 && resizeTime.getMinutes() === 0) ? util.addDays(resizeTime, 1) : resizeTime;
451
456
  if (isWithoutScale && (resizeEnd.getTime() - eventStart.getTime()) <= 0) {
452
457
  resizeEnd = util.addDays(util.resetTime(eventStart), 1);
453
458
  }
@@ -484,29 +489,30 @@ var Resize = /** @class */ (function (_super) {
484
489
  var slotInterval = (this.actionObj.cellWidth / this.actionObj.slotInterval) * this.actionObj.interval;
485
490
  var pageWidth = isLeft ? (this.actionObj.X - this.actionObj.pageX) : (this.actionObj.pageX - this.actionObj.X);
486
491
  var targetWidth = isTimelineView ?
487
- (this.actionObj.element.offsetWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth :
488
- this.parent.currentView === 'Month' ? this.actionObj.element.offsetWidth :
489
- Math.ceil(this.actionObj.element.offsetWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth;
492
+ (this.actionObj.element.getBoundingClientRect().width / this.actionObj.cellWidth) * this.actionObj.cellWidth :
493
+ this.parent.currentView === 'Month' ? this.actionObj.element.getBoundingClientRect().width :
494
+ Math.ceil(this.actionObj.element.getBoundingClientRect().width / this.actionObj.cellWidth) * this.actionObj.cellWidth;
490
495
  var offsetWidth = targetWidth + (Math.ceil(pageWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth);
496
+ var left = (this.parent.enableRtl) ? parseInt(this.actionObj.element.style.right, 10) : this.actionObj.clone.offsetLeft;
491
497
  if (isTimeViews) {
492
- offsetWidth = targetWidth + (isLeft ? (Math.ceil(pageWidth / slotInterval) * slotInterval) :
493
- (Math.floor(pageWidth / slotInterval) * slotInterval));
498
+ offsetWidth = targetWidth + (Math.ceil(pageWidth / slotInterval) * slotInterval);
499
+ offsetWidth = (Math.round((left + offsetWidth) / slotInterval) * slotInterval) - left;
494
500
  this.actionObj.event[this.parent.eventFields.isAllDay] = false;
495
501
  }
496
502
  var width = !isLeft && ((offsetWidth + this.actionObj.clone.offsetLeft > this.scrollArgs.width)) ?
497
- this.actionObj.clone.offsetWidth : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
503
+ this.actionObj.clone.getBoundingClientRect().width : (offsetWidth < this.actionObj.cellWidth) ? offsetWidth : offsetWidth;
498
504
  if (this.parent.enableRtl) {
499
505
  var rightValue = isTimelineView ? parseInt(this.actionObj.element.style.right, 10) :
500
506
  -(offsetWidth - this.actionObj.cellWidth);
501
507
  rightValue = isTimelineView ? rightValue : isLeft ? 0 : rightValue > 0 ? 0 : rightValue;
502
508
  if (isTimelineView && !isLeft) {
503
- rightValue = Math.ceil((this.actionObj.element.offsetLeft + (this.actionObj.element.offsetWidth +
509
+ rightValue = Math.ceil((this.actionObj.element.offsetLeft + (this.actionObj.element.getBoundingClientRect().width +
504
510
  (this.actionObj.pageX - this.actionObj.X))) / slotInterval) * slotInterval;
505
511
  rightValue = rightValue < 0 ? Math.abs(rightValue) : -rightValue;
506
512
  }
507
513
  rightValue = rightValue >= this.scrollArgs.width ? this.scrollArgs.width - this.actionObj.cellWidth : rightValue;
508
514
  styles.right = formatUnit(rightValue);
509
- width = width + rightValue > this.scrollArgs.width ? this.actionObj.clone.offsetWidth : width;
515
+ width = width + rightValue > this.scrollArgs.width ? this.actionObj.clone.getBoundingClientRect().width : width;
510
516
  }
511
517
  else {
512
518
  var offsetLeft = isLeft ? this.actionObj.element.offsetLeft - (this.actionObj.X - this.actionObj.pageX) :
@@ -514,12 +520,12 @@ var Resize = /** @class */ (function (_super) {
514
520
  if (isTimelineView) {
515
521
  offsetLeft = isLeft ? offsetLeft : parseInt(this.actionObj.clone.style.left, 10);
516
522
  if (this.parent.enableRtl) {
517
- offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - this.actionObj.clone.offsetWidth) ?
518
- parseInt(this.actionObj.clone.style.right, 10) : offsetLeft : offsetLeft;
523
+ offsetLeft = !isLeft ? (this.actionObj.pageX < this.actionObj.X - this.actionObj.clone.getBoundingClientRect().width)
524
+ ? parseInt(this.actionObj.clone.style.right, 10) : offsetLeft : offsetLeft;
519
525
  }
520
526
  else {
521
- offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + this.actionObj.clone.offsetWidth &&
522
- this.actionObj.clone.offsetWidth === this.actionObj.cellWidth) ?
527
+ offsetLeft = isLeft ? (this.actionObj.pageX > this.actionObj.X + this.actionObj.clone.getBoundingClientRect().width &&
528
+ this.actionObj.clone.getBoundingClientRect().width === this.actionObj.cellWidth) ?
523
529
  parseInt(this.actionObj.clone.style.left, 10) : offsetLeft : offsetLeft;
524
530
  }
525
531
  }
@@ -529,9 +535,10 @@ var Resize = /** @class */ (function (_super) {
529
535
  Math.ceil(Math.abs(offsetLeft) / this.actionObj.cellWidth) * this.actionObj.cellWidth;
530
536
  if (offsetLeft < 0) {
531
537
  offsetLeft = 0;
532
- width = this.actionObj.clone.offsetWidth;
538
+ width = this.actionObj.clone.getBoundingClientRect().width;
533
539
  }
534
- var cloneWidth = Math.ceil(this.actionObj.clone.offsetWidth / this.actionObj.cellWidth) * this.actionObj.cellWidth;
540
+ var cloneWidth = Math.ceil(this.actionObj.clone.getBoundingClientRect().width / this.actionObj.cellWidth) *
541
+ this.actionObj.cellWidth;
535
542
  if (isLeft) {
536
543
  styles.left = formatUnit(isTimelineView ? offsetLeft : isLeft ? leftValue < 0 ? -offsetLeft :
537
544
  (Math.ceil((targetWidth - cloneWidth) / this.actionObj.cellWidth) * this.actionObj.cellWidth) : offsetLeft);
@@ -44,6 +44,12 @@ export declare const DATE_HEADER_CONTAINER_CLASS: string;
44
44
  /** @private */
45
45
  export declare const HEADER_CELLS_CLASS: string;
46
46
  /** @private */
47
+ export declare const HEADER_WEEK_CELLS_CLASS: string;
48
+ /** @private */
49
+ export declare const HEADER_MONTH_CELLS_CLASS: string;
50
+ /** @private */
51
+ export declare const HEADER_YEAR_CELLS_CLASS: string;
52
+ /** @private */
47
53
  export declare const WORKDAY_CLASS: string;
48
54
  /** @private */
49
55
  export declare const OTHERMONTH_CLASS: string;
@@ -44,6 +44,12 @@ export var DATE_HEADER_CONTAINER_CLASS = 'e-date-header-container';
44
44
  /** @private */
45
45
  export var HEADER_CELLS_CLASS = 'e-header-cells';
46
46
  /** @private */
47
+ export var HEADER_WEEK_CELLS_CLASS = 'e-header-week-cell';
48
+ /** @private */
49
+ export var HEADER_MONTH_CELLS_CLASS = 'e-header-month-cell';
50
+ /** @private */
51
+ export var HEADER_YEAR_CELLS_CLASS = 'e-header-year-cell';
52
+ /** @private */
47
53
  export var WORKDAY_CLASS = 'e-work-days';
48
54
  /** @private */
49
55
  export var OTHERMONTH_CLASS = 'e-other-month';
@@ -170,7 +170,8 @@ var MonthEvent = /** @class */ (function (_super) {
170
170
  setStyleAttribute(cell, { 'height': height_1 + 'px' });
171
171
  });
172
172
  }
173
- var cellDetail = this.workCells.slice(-1)[0].getBoundingClientRect();
173
+ var cellDetail = this.workCells[this.parent.activeView.isTimelineView() ?
174
+ 0 : this.workCells.length - 1].getBoundingClientRect();
174
175
  this.cellWidth = cellDetail.width;
175
176
  this.cellHeight = cellDetail.height;
176
177
  this.dateRender = dateRender;
@@ -417,7 +417,7 @@ var HeaderRenderer = /** @class */ (function () {
417
417
  break;
418
418
  case 'e-today':
419
419
  currentTime = util.resetTime(this.parent.getCurrentTime());
420
- if (this.parent.currentView === 'Agenda' || !this.parent.isSelectedDate(currentTime) ||
420
+ if (this.parent.currentView === 'Agenda' || this.parent.currentView === 'MonthAgenda' || !this.parent.isSelectedDate(currentTime) ||
421
421
  this.parent.currentView === 'Month' && this.parent.activeViewOptions.displayDate && !this.hasSelectedDate() &&
422
422
  util.resetTime(this.parent.activeViewOptions.displayDate) !== currentTime || this.parent.currentView === 'Month' &&
423
423
  this.parent.activeViewOptions.numberOfWeeks > 0 && !this.hasSelectedDate()
@@ -445,9 +445,11 @@ var ViewBase = /** @class */ (function () {
445
445
  setStyleAttribute(resourceColumn, { 'height': formatUnit(content.clientHeight) });
446
446
  }
447
447
  }
448
- var headerCellElements = [].slice.call(this.element.querySelectorAll('.' + cls.HEADER_CELLS_CLASS));
448
+ var cssClass = "." + cls.HEADER_CELLS_CLASS + ",." + cls.TIME_SLOT_CLASS + ",." + cls.HEADER_WEEK_CELLS_CLASS + ",." + cls.HEADER_MONTH_CELLS_CLASS + ",." + cls.HEADER_YEAR_CELLS_CLASS;
449
+ var headerCellElements = [].slice.call(this.element.querySelectorAll(cssClass));
449
450
  headerCellElements.forEach(function (ele) {
450
- var headerCellColSpan = parseInt(ele.getAttribute('colspan'), 10);
451
+ var colSpan = isNullOrUndefined(ele.getAttribute('colspan')) ? '1' : ele.getAttribute('colspan');
452
+ var headerCellColSpan = parseInt(colSpan, 10);
451
453
  setStyleAttribute(ele, { 'width': formatUnit(colWidth_1 * headerCellColSpan) });
452
454
  });
453
455
  }