Our pure JavaScript Scheduler component


Post by karin112358 »

Hello Bryntum Team,

in Austria, lots of people are working 38.5 hours per week (= 7.7 hours per day = 7 hours and 42 minutes). I am trying to show these 7.7 hours per day as working time in the Bryntum Scheduler. Therefore I have created a calendar with the following settings:

            {
                id                      : 'weekdays',
                name                    : 'Weekdays',
                unspecifiedTimeIsWorking: false,
                intervals               : [
                    {
                        recurrentStartDate: 'every weekday at 8:00',
                        recurrentEndDate: 'every weekday at 15:42',
                        isWorking: true
                    }
                ]
            }

Unfortunately, the snapping behavior of events is not consistent when dragging the end of an event to the end of a day.

Attached you can find the complete sample code (scheduler-snapping-bug.txt) and some screenshots for the following two scenarios.

Case 1:

Drag end of event with mouse to 6:00pm. On the first attempt, the event is displayed correctly (after a short flickering). Try again to drag the end of the event to 6:00pm. Now the end of the event is shown at 8:00am on the next day but the tooltip still says 3:42pm.

Case 2:

When there is an event in the calendar for the second resource, this event is resized automatically after resizing the first event for the first resource.

When using 15:45 or 15:40 instead of 15:42 the scheduler works as expected.

Is there anything I can change to allow snapping to 15:42?

Thanks for your help!

Attachments
screenshots.zip
(128.02 KiB) Downloaded 43 times
scheduler-snapping-bug.txt
(3.04 KiB) Downloaded 53 times

Post by alex.l »

I cannot reproduce the problem with inconsistent data in the tooltip and on a timeAxis, but

columnLinesFor: 2,

You have only 2 headers, so index 2 is not exists. Please see console error because of that. I changed it to 1 to fix.
https://bryntum.com/docs/scheduler-pro/api/Scheduler/preset/ViewPreset#field-columnLinesFor

Is there anything I can change to allow snapping to 15:42?

You used timeResolution: { unit: 'hour', increment: 0.5 },, so it will be rounded to closest 30 minutes when drop.
You can use increment 1 minute or so for you viewPreset, if you need values like 10:42.
https://bryntum.com/docs/scheduler-pro/api/Scheduler/preset/ViewPreset#field-timeResolution

Please update your code and let us know if it works now.

All the best,
Alex


Post by karin112358 »

I have attached a video with the strange behavior.

We would like to snap to 30 minutes. But when the planning exceeds 15:42 it should snap to 15:42 as this is the maximum per day. Sometimes this works and sometimes it snaps to 08:00 on the next day. And sometimes even other plannings for other resources are automatically modified. With 15:40 or 15:41 everything would work fine.

Thanks for your help!

Attachments
bandicam 2022-05-18 10-46-55-777.mp4
(1.57 MiB) Downloaded 42 times

Post by alex.l »

Thank you for your video. I've reproduced the problem and opened a ticket for that: https://github.com/bryntum/support/issues/4664

All the best,
Alex


Post Reply