search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

DayPilot.Scheduler.selectTimeRange() seems to snap wrong

Asked by Leo
13 days ago.

Hi there,

in Day View of DayPilot.Scheduler, when having snapToGrid = true, using selectTimeRange() has an unintended effect.

E.g. doing:

DayPilot.Scheduler.selectTimeRange("2024-06-05T10:00:00", "2024-06-05T11:00:00", “xxx”, false);

With a 15-min. grid, the selection will jump from 10.00am to 11.15am. The snapToGrid seems to increment the selection. Our current workaround is removing one second from the times to select, e.g. 2024-06-05T10:59:59.

Is this intended?

Comment posted by Dan Letecky [DayPilot]
13 days ago.

This is not intended. But unfortunately, I’m not able to reproduce the problem. Could you please post your config?

Comment posted by Leo
13 days ago.

Sure, this is our config:

this.scheduler.viewType = 'Day';
this.scheduler.heightSpec = 'BusinessHours';
this.scheduler.locale = this.settings.locale;
this.scheduler.businessBeginsHour = 8;
this.scheduler.businessEndsHour = 18;
this.scheduler.cellDuration = 15;
this.scheduler.cellHeight = 12;
this.scheduler.eventClickHandling = 'Disabled';
this.scheduler.eventDoubleClickHandling = 'Enabled';
this.scheduler.eventResizeHandling = 'Enabled';
this.scheduler.eventMoveHandling = 'Enabled';
this.scheduler.eventHoverHandling = 'Disabled';
this.scheduler.crosshairType = 'Disabled';
this.scheduler.allowEventOverlap = false;
this.scheduler.timeRangeSelectedHandling = 'Enabled';
this.scheduler.showAllDayEvents = false;
this.scheduler.headerDateFormat = 'dddd, dd.MM.yyyy';
this.scheduler.headerHeight = 0;
this.scheduler.hourWidth = 55;
Answer posted by Dan Letecky [DayPilot]
4 days ago.


It turned out to be the Calendar component and it should be fixed now in the latest sandbox build (2024.2.5954):

New Reply
This reply is
or drop files here
Your name (optional):