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

Scheduler - How set the same margin between events and between events and cell borders

Asked by Anonymous
1 month ago.

Is it possible to set a horizontal margin of 1 pixel between events and between events and their cell's boders? withhout affecting the events width, of course?

Answer posted by Dan Letecky [DayPilot]
1 month ago.

There are two options:

1. You can use "eventMarginLeft" and/or "eventMarginRight" properties:

https://api.daypilot.org/daypilot-scheduler-eventmarginleft/
https://api.daypilot.org/daypilot-scheduler-eventmarginright/

These options will make the actual event div smaller (and it will affect the overlaps calculation).

2. You can override the CSS and only make the inner div smaller. The event width will remain the same but there will be an empty space at the beginning/end:

body .scheduler_default_event_inner {
  left: 1px;
  right: 1px;
}
Comment posted by Anonymous
1 month ago.
With the following configuration I'm getting the result as seen in the attached screenshot.
rowMarginTop: 1,
rowMarginBottom: 1,
eventMarginBottom: 1,
eventMarginLeft: 1,
eventMarginRight: 1,
Comment posted by Dan Letecky [DayPilot]
1 month ago.

Yes, this is correct - normally (without eventMarginRight: 1) the second event would end on the vertical background line.

Comment posted by Anonymous
1 month ago.

Yes, but I want to have a space of 1px between the second event's end and the cell's right border. This would be the same as the space between the first event's start and the left cell's border

At least the second event's end shouldn't cover the cell's right border. For my understanding is not correct.

Comment posted by Dan Letecky [DayPilot]
1 month ago.

Every horizontal pixel in the grid has an associated time range. The vertical line that separates cells has to be part of a cell - either at the beginning or at the end. The Scheduler displays the vertical line at the end of each cell and it is part of the cell. That's how it works - it is not possible to exclude the vertical line from both cells (first/second).

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