Our pure JavaScript Scheduler component

Post by albert.piacka »


I would like to ask for help with a certain functionality in the scheduler. When I drag an event, it "snaps" to 00:00:00 time, but when I drop it, it snaps to the correct value it already had defined (e.g., 12 AM).

I am not sure if this is a bug or if my configuration is missing something. I think the snapRelativeToEventStartDate property might not be working as intended.

Here's my current config:

      infiniteScroll: true,
      rowHeight: 50,
      hideHorizontalScrollbar: true,
      zoomOnTimeAxisDoubleClick: false,
      zoomOnMouseWheel: false,
      allowOverlap: false,
      snap: true,
      snapRelativeToEventStartDate: true,
      useInitialAnimation: false,
      viewPreset: 'monthAndDay',
visibleDate: { date: dayjs().startOf('day').toDate(), edgeOffset: 100 },

using this view preset config:

    id: 'monthAndDay',
    timeResolution: {
      unit: 'day',
      increment: 1

Here's the video to demonstrate my issue:

I'd be grateful for any help.

Post by mats »

What version are you using?

Post by albert.piacka »

Bryntum Scheduler 5.6.9

// edit

Post by mats »

Does it work if you upgrade to 5.6.12?

Post by albert.piacka »

The drag operation works, but resizing does not (it snaps to 00:00:00).
Also, is there a way to snap a new event to a pre-defined time when creating it by dragging? I use 'onBeforeEventEdit' to adjust the time after the event has been created:

      onBeforeEventEdit({ eventRecord }: { eventRecord: ReservationModel }) {

Here's the video:



Post by alex.l »


Thanks for the info, I've reproduced the problem in our environment. Here is the ticket https://github.com/bryntum/support/issues/9394
You can subscribe on ticket updates to be notified when it's done.

Also, is there a way to snap a new event to a pre-defined time when creating it by dragging?

Only with custom code. Your solution looks reasonable to me. The only thing, use this method, it will handle operation faster https://bryntum.com/products/scheduler/docs/api/Scheduler/model/TimeSpan#function-setStartEndDate

All the best,

Post Reply