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

Scheduler small events width

Asked by Martin Säfsten
5 years ago.

Hey!

Some of our customers have reported a bug which I am struggling to reproduce myself. I'm hoping that maybe you guys maybe have seen this aswell.

Im using the Angular Scheduler, and we use Daypilot to organize daily activities over a day. We are using cellGroupBy: 'Hour', with two sliders to set the cell duration and cell width.

A couple of customers have reported that the small events, which has a duration of 5-20 minutes, sometimes change size graphically in the daypilot scheduler, making them look longer than what they actually are.

One concrete example of a configuration was this:
cellDuration: 5
cellWidth: 15

With this configuration, some of the 5 minute events (which should cover one cell in this config), changed to covering two cells. It seems like it happened on a reload of the events. They also reported that a 15 minute event (that covers 3) covered 4.

I used to work with the .NET version of Daypilot before, and I'm pretty sure that I saw this happen on that, but only when the cellDuration wasn't lining up with the width of the event. But this is not what our customer reported atleast.

I'm attaching a image of a part of our scheduler. The three events to the left (Two yellow and one blue) are all 5 minutes, and this is the scenario that can cause this graphical bug.

Our customers use Chrome on Windows 7/8/10 computers. I don't know which version of windows was on the computers that has seen this, but it happened on multiple computers.

Answer posted by Dan Letecky [DayPilot]
5 years ago.

Hi Martin,

If this only affects short events, I'd recommend reviewing the useEventBoxes property:

https://doc.daypilot.org/scheduler/exact-event-duration/
https://api.daypilot.org/daypilot-scheduler-useeventboxes/

Using useEventBoxes = "ShortEventsOnly" would cause something like this if the event duration is shorter than cellDuration.

Let me know if this doesn't explain the issue.

Comment posted by Martin Säfsten
5 years ago.

Hey Dan, thanks for replying.

I did check out useEventBoxes, and we are using the default value "Always", which is what we want aswell. Turning that off looks like it could potentially cover the smaller events and feel like you are "losing" them to our customers.
And as you said, this phenomenon does occur when the event duration is smaller than cell duration.

However the customer that provided me with the best description was very sure that they have seen this on events that are 5 minutes or 15 minutes long, with a cellDuration of 5 minutes. That to me sounds like very strange, and as I said, I've been struggling to reproduce it.

Do you think its worth a shot to set useEventBoxes to ShortEventsOnly and trying that out?

Comment posted by Dan Letecky [DayPilot]
5 years ago.

There are couple of important things to know:

1. No matter what useEventBoxes value you use, the events will never get hidden. If they overlap, the row height will be extended and they will be displayed side-by-side. If they do get hidden, that would be a rendering/position calculation bug but that never happened so far. (Let me know if you feel that's the case.)

2. Using ShortEventsOnly would only change rendering of events longer than cellDuration, so that's probably not going to help.

3. If a 5-minute event spans two 5-minute cells it means that the start and end times don't match (event vs cell). I recommend checking how you set the startDate value. This affects how the timeline (the time cell start/end) is calculated. For the predefined scale values ('Day', 'Hour', etc.) the cell start/end is adjusted to the unit start/end (day, hour...). However, for scale="CellDuration" it simply adds the cellDuration value to startDate. If you use something like startDate = new DayPilot.Date() instead of startDate = DayPilot.Date.today() you can get unpredictable cell start/end values.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.