Progress is not calculating properly

I have event starts in this month ends in next month if i update progress for this month its calculating for this month only and not considering the next month

scheduler.templates.event_bar_text = (start, end, event) => {
let days = this.oMomentHelper.calculateDaysForCalendar(start, end);
return `
<div class=“saar_progress_text” style=“width:${event.tsk_progress}%;display:inline-block; background-color:${event?.progressColor};”" >

   <div class="${draggableAndDisableClass}" style = "left:${event.tsk_progress}%; width: 5px; z-index:1111"></div>
   <div class='saar-schd-tl-progress-text'>${event.text}</div>
   `;

}
scheduler.event(schedulerContainer, “mousemove”, (e) => {
if (scheduler.getEvent(eventId)) {
if (!positionChanged && startPos !== e.pageX) {
positionChanged = true;
}
if (positionChanged) {
// let oEvent = scheduler.getEvent(eventId);
let taskData;
const eventLine = scheduler[‘$root’].querySelector(“.dhx_cal_event_line[data-event-id='” + eventId + “'”);
const eventLineXPos = eventLine.getBoundingClientRect().x;
const dragPos = Math.max(e.pageX - eventLineXPos, 0);
const fullWidth = eventLine.offsetWidth || 1;
const computedProgress = Math.min(dragPos, fullWidth) / fullWidth;
progress = Math.round(computedProgress * 100);
console.log(progress);

      // if (this.typeSelectedValue != SchedulerCommonConstants.TASKS) {
      //   this.updateUimodelAndSave(oEvent.as_task_id, roundedProgress);
      // }
      //  else {
      //   this.updateUimodelAndSave(oEvent.id);
      // }

    }
  }
});

scheduler.event(schedulerContainer, ‘mouseup’, (e) => {
let oEvent = scheduler.getEvent(eventId);

  if (positionChanged && this.typeSelectedValue == SchedulerCommonConstants.TASKS) {
    oEvent.tsk_progress = progress;
    this.scheduler.updateEvent(oEvent);
    //   this.updateUimodelAndSave(oEvent.as_task_id, progress);
  }
  eventId = null;
  startPos = null;
  progress = null;
  positionChanged = false;

});

}

Hello @SLokesh,

I tried to reproduce the issue in our snippet tool(by adding the provided code), but it doesn’t work:
https://snippet.dhtmlx.com/8pkai17m

Unfortunately, it’s hard to suppose what exactly goes wrong as it’s a custom code, and I can’t reproduce the issue.

Could you please reproduce it in the snippet above(open the snippet => reproduce the issue => click the “Save” button => post here the new link)? So I will check it, and will try to provide suggestions to achieve the required behavior.

Kind regards,