@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.
@@ -23956,9 +23956,13 @@ class VerticalView extends ViewBase {
23956
23956
  }
23957
23957
  getTopFromDateTime(date) {
23958
23958
  const startHour = this.getStartEndHours(this.parent.activeViewOptions.startHour);
23959
+ const endHour = this.getStartEndHours(this.parent.activeViewOptions.endHour);
23959
23960
  const diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
23960
- return (diffInMinutes * this.getWorkCellHeight() * this.parent.activeViewOptions.timeScale.slotCount) /
23961
- this.parent.activeViewOptions.timeScale.interval;
23961
+ const hoursRange = getStartEndHours(resetTime(new Date(date.getTime())), startHour, endHour);
23962
+ const interval = this.parent.activeViewOptions.timeScale.slotCount !== 1 ?
23963
+ this.parent.activeViewOptions.timeScale.interval :
23964
+ (hoursRange.endHour.getTime() - hoursRange.startHour.getTime()) / MS_PER_MINUTE;
23965
+ return (diffInMinutes * this.getWorkCellHeight() * this.parent.activeViewOptions.timeScale.slotCount) / interval;
23962
23966
  }
23963
23967
  getWorkCellHeight() {
23964
23968
  return parseFloat(this.parent.getElementHeight(this.element.querySelector('.' + WORK_CELLS_CLASS)).toFixed(2));
@@ -26946,8 +26950,13 @@ class TimelineViews extends VerticalView {
26946
26950
  }
26947
26951
  getLeftFromDateTime(currentDateIndex, date) {
26948
26952
  const startHour = this.getStartHour();
26953
+ const endHour = this.getEndHour();
26949
26954
  let diffInDates = 0;
26950
26955
  let diffInMinutes = ((date.getHours() - startHour.getHours()) * 60) + (date.getMinutes() - startHour.getMinutes());
26956
+ const hoursRange = getStartEndHours(resetTime(new Date(date.getTime())), startHour, endHour);
26957
+ const interval = this.parent.activeViewOptions.timeScale.slotCount !== 1 ?
26958
+ this.parent.activeViewOptions.timeScale.interval :
26959
+ (hoursRange.endHour.getTime() - hoursRange.startHour.getTime()) / MS_PER_MINUTE;
26951
26960
  if (!isNullOrUndefined(currentDateIndex)) {
26952
26961
  if (currentDateIndex[0] !== 0) {
26953
26962
  const index = this.parent.activeView.colLevels.findIndex((level) => level[0].type === 'dateHeader');
@@ -26965,7 +26974,7 @@ class TimelineViews extends VerticalView {
26965
26974
  }
26966
26975
  }
26967
26976
  return diffInDates + ((diffInMinutes * this.parent.getElementWidth(this.element.querySelector('.e-work-cells'))
26968
- * this.parent.activeViewOptions.timeScale.slotCount) / this.parent.activeViewOptions.timeScale.interval);
26977
+ * this.parent.activeViewOptions.timeScale.slotCount) / interval);
26969
26978
  }
26970
26979
  renderHeader() {
26971
26980
  const tr = createElement('tr');