Back to Devexpress

How to: Show Night Shift as One Day in the DayView

windowsforms-9872-controls-and-libraries-scheduler-examples-date-and-time-how-to-show-night-shift-as-one-day-in-the-dayview.md

latest923 B
Original Source

How to: Show Night Shift as One Day in the DayView

  • Oct 29, 2020

Although a night shift from 18.00 to 9.00 occurs across multiple dates, it should be handled as one “Day”. To accomplish this task, specify visible intervals as follows.

csharp
schedulerControl1.Views.DayView.VisibleTime.End = System.TimeSpan.Parse("1.09:00:00");
schedulerControl1.Views.DayView.VisibleTime.Start = System.TimeSpan.Parse("18:00:00");
vb
schedulerControl1.Views.DayView.VisibleTime.End = System.TimeSpan.Parse("1.09:00:00")
schedulerControl1.Views.DayView.VisibleTime.Start = System.TimeSpan.Parse("18:00:00")

Note that you should assign values in the order shown below - first for the End property of the DayView.VisibleTime range, then for the Start property.