kendo-angular
kendo-angular copied to clipboard
Scheduler: wrong date in kendoSchedulerTimeSlotTemplate for timeline views
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
Here with UTC -4 clock in OS settings
Other views seem ok (day/week/workWeek)
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
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>
So after almost 2 years, why they there is no fix for this, although flagged with high severity? @tapopov , @gkarapeev ?
Closing as duplicate of https://github.com/telerik/kendo-angular/issues/3916