kendo-angular icon indicating copy to clipboard operation
kendo-angular copied to clipboard

Scheduler: wrong date in kendoSchedulerTimeSlotTemplate for timeline views

Open Felx-B opened this issue 4 years ago • 2 comments

Hi

Describe the bug Date passed to kendoSchedulerTimeSlotTemplate have timezone offset in timelines view (timeline/timelineWeek/timelineMonth)

Here with UTC +1 clock in OS settings image

Here with UTC -4 clock in OS settings image

Other views seem ok (day/week/workWeek)

image

To Reproduce Here is the stackblitz : https://stackblitz.com/edit/angular-scheduler-timeslot

Expected behavior Date passed to template should be the slot date

Browser

  • OS: Windows 10
  • Browser Chrome
  • Version 86

Thank you

Felx-B avatar Oct 19 '20 10:10 Felx-B

I found the bug in your code : src\views\timeline\timeline-multi-day-view.component.ts line 141 :

<ng-container *ngIf="timeSlotTemplateRef" [ngTemplateOutlet]="timeSlotTemplateRef"
    [ngTemplateOutletContext]="{ date: timeSlot.start, resources: resourcesByIndex(timeSlot.id.resourceIndex ) }">
</ng-container>

should be

<ng-container *ngIf="timeSlotTemplateRef" [ngTemplateOutlet]="timeSlotTemplateRef"
    [ngTemplateOutletContext]="{ date: timeSlot.startLocalTime, resources: resourcesByIndex(timeSlot.id.resourceIndex ) }">
</ng-container>

Felx-B avatar Oct 19 '20 11:10 Felx-B

So after almost 2 years, why they there is no fix for this, although flagged with high severity? @tapopov , @gkarapeev ?

PeterStaev avatar Sep 27 '22 17:09 PeterStaev

Closing as duplicate of https://github.com/telerik/kendo-angular/issues/3916

stnikolova avatar Jun 15 '23 07:06 stnikolova