@syncfusion/ej2-schedule 27.2.3 → 27.2.5

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.
@@ -24790,9 +24790,13 @@ var VerticalView = /** @__PURE__ @class */ (function (_super) {
24790
24790
  };
24791
24791
  VerticalView.prototype.getTopFromDateTime = function (date) {
24792
24792
  var startHour = this.getStartEndHours(this.parent.activeViewOptions.startHour);
24793
+ var endHour = this.getStartEndHours(this.parent.activeViewOptions.endHour);
24793
24794
  var diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
24794
- return (diffInMinutes * this.getWorkCellHeight() * this.parent.activeViewOptions.timeScale.slotCount) /
24795
- this.parent.activeViewOptions.timeScale.interval;
24795
+ var hoursRange = getStartEndHours(resetTime(new Date(date.getTime())), startHour, endHour);
24796
+ var interval = this.parent.activeViewOptions.timeScale.slotCount !== 1 ?
24797
+ this.parent.activeViewOptions.timeScale.interval :
24798
+ (hoursRange.endHour.getTime() - hoursRange.startHour.getTime()) / MS_PER_MINUTE;
24799
+ return (diffInMinutes * this.getWorkCellHeight() * this.parent.activeViewOptions.timeScale.slotCount) / interval;
24796
24800
  };
24797
24801
  VerticalView.prototype.getWorkCellHeight = function () {
24798
24802
  return parseFloat(this.parent.getElementHeight(this.element.querySelector('.' + WORK_CELLS_CLASS)).toFixed(2));
@@ -27965,8 +27969,13 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
27965
27969
  };
27966
27970
  TimelineViews.prototype.getLeftFromDateTime = function (currentDateIndex, date) {
27967
27971
  var startHour = this.getStartHour();
27972
+ var endHour = this.getEndHour();
27968
27973
  var diffInDates = 0;
27969
27974
  var diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
27975
+ var hoursRange = getStartEndHours(resetTime(new Date(date.getTime())), startHour, endHour);
27976
+ var interval = this.parent.activeViewOptions.timeScale.slotCount !== 1 ?
27977
+ this.parent.activeViewOptions.timeScale.interval :
27978
+ (hoursRange.endHour.getTime() - hoursRange.startHour.getTime()) / MS_PER_MINUTE;
27970
27979
  if (!isNullOrUndefined(currentDateIndex)) {
27971
27980
  if (currentDateIndex[0] !== 0) {
27972
27981
  var index = this.parent.activeView.colLevels.findIndex(function (level) { return level[0].type === 'dateHeader'; });
@@ -27976,15 +27985,15 @@ var TimelineViews = /** @__PURE__ @class */ (function (_super) {
27976
27985
  this.parent.getElementWidth(this.element.querySelector('.e-work-cells'));
27977
27986
  }
27978
27987
  else {
27979
- var endHour = this.getEndHour();
27980
- var end = (endHour.getHours() === 0) ? 24 : endHour.getHours();
27988
+ var endHour_1 = this.getEndHour();
27989
+ var end = (endHour_1.getHours() === 0) ? 24 : endHour_1.getHours();
27981
27990
  diffInMinutes = diffInMinutes + ((currentDateIndex[0]) * (((end - startHour.getHours()) * 60) +
27982
- (endHour.getMinutes() - startHour.getMinutes())));
27991
+ (endHour_1.getMinutes() - startHour.getMinutes())));
27983
27992
  }
27984
27993
  }
27985
27994
  }
27986
27995
  return diffInDates + ((diffInMinutes * this.parent.getElementWidth(this.element.querySelector('.e-work-cells'))
27987
- * this.parent.activeViewOptions.timeScale.slotCount) / this.parent.activeViewOptions.timeScale.interval);
27996
+ * this.parent.activeViewOptions.timeScale.slotCount) / interval);
27988
27997
  };
27989
27998
  TimelineViews.prototype.renderHeader = function () {
27990
27999
  var tr = createElement('tr');