HIde empty cells
10 years ago.
Is it possible to hide the empty cells, the cells without an event?hide or collapsed are acceptable both
Is it possible to hide the empty cells, the cells without an event?hide or collapsed are acceptable both
Which control do you mean (Calendar/Scheduler/Month)?
i mean Scheduler, but if it is available in two other let me know
1. In the Scheduler (http://javascript.daypilot.org/scheduler/), you have the following options:
(1.A) X-Axis (Time)
You can hide certain time periods. You can do it either using onIncludeCell (which modifies the automatically-generated timeline):
http://doc.daypilot.org/scheduler/hiding-time-columns/
or by building your own timeline:
http://doc.daypilot.org/scheduler/timeline/
In both cases, you need to know which cells (columns) you want to hide.
(1.B) Y-Axis (Resources)
The height of the resources row is determined by the event height (or the multiple the event height in case of overlapping events).
It is possible to reduce the height of resources that don't have any events using the following configuration:
Set the default event height:
dp.eventHeight = 10; // this is the reduced height which will be the default for all resources
Add the normal event height to all event objects:
dp.events.list = [
{id: 1, ....., height: 20},
{id: 2, ....., height: 20},
]
2. In the Calendar (http://javascript.daypilot.org/calendar/), you can hide "non-business" hours with no events using hideFreeCells property:
dp.hideFreeCells = true;
This will only hide cells outside of the range defined using businessBeginsHour and businessEndsHour.
Besides that, you can force hiding of certain hours using dayBeginsHour and dayEndsHour properties. It works for dayBeginsHour > dayEndsHour as well (an overnight shift):
http://doc.daypilot.org/calendar/overnight-scheduling/
3. In the Monthly calendar (http://javascript.daypilot.org/month/) it is only possible to hide weekend cells:
http://doc.daypilot.org/month/hiding-weekends/
You need to decide whether to hide the weekends yourself.
I have to work with minutes because our scheduler has in Y-AIXS the hours/2 (each cell has duration 30 minutes). so i have 48 cells.
I prefered the second method with custom timeline but the broswer cannot afford the rendering...
dp.timeline = [];
for (var i = 0; i < 1440; i+30) {
var hour = {};
hour.start = dp.startDate.addMinutes(i);
hour.end = hour.start.addMinutes(30);
hour.width = 100;
dp.timeline.push(hour);
}
here is my code,
coudl you advise me something else?
You need to add this:
dp.scale = "Manual";
This will switch the scale to manual mode and the timeline cells will be loaded from the timeline array.
Hello again,
Your ibnstruction ws helpfull thanks...
Is it possible to have dynamic width for cells, because the information is hidden in some events.Ι know the width is according to the duration of cell, but let me know if i can handle it with some way
*Your ibnstruction ws helpfull thanks...
by mistake
Your instructions was helpful thanks...
Unfortunately the width can't be changed - it is always derived from the duration and cell width.
If you want to display more information you can change the height temporarily:
dp.onEventClick = function(args) { args.e.data.height = 50; dp.events.update(args.e); }
Or you can display a bubble with more details:
This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.
DayPilot