You can hide time units in the horizontal scale of a view. For example, hide weekends and display only working days.
Generally, to hide a time unit in the scale of a view (an hour in the Timeline view, a day in the Month, Week view etc.), use one of two methods:
For example, to hide non-working hours from the Timeline view (18.00 - 08.00 or 6 PM - 8 AM) and weekends from the Week view, use the code as in:
var sched = new DHXScheduler(this);
...
var timeline = new TimelineView("timeline", "room_id");
timeline.X_Unit = TimelineView.XScaleUnits.Hour;
timeline.X_Size = 48;
timeline.Scale.IgnoreRange(19, 23);
timeline.Scale.IgnoreRange(0, 7);
sched.Views.Add(timeline);
var month = sched.Views[0];
month.Scale.Ignore((int)DayOfWeek.Saturday, (int)DayOfWeek.Sunday);
To highlight the place where you hide scale units, you may use the DHXMarkTime class. For example, in the Timeline view we preserve hours from 10:00 till 18:00 and hide the remaining ones. To highlight the place of omitted hours we will use a marker of 40-minute duration: 20 minute in each of bordering cells.
.day_split{
background-color: #77ff77;
opacity: 0.25;
}
sched.TimeSpans.Add(new DHXMarkTime
{
FullWeek = true,
Zones = new List<Zone>{ new Zone( 9*60 + 30, 20*60 + 30)},
CssClass = "day_split",
InvertZones = true
});