I'm using a custom timeline so that I can start my timeline at a specific hour. I have my time headers grouped by Day, but the Day grouping is not grouping on Day boundaries. Rather it is simply assuming the first 24 hours make 1 day, but I might start my timeline at 3am. How can I get my time headers to align with day boundaries?
Here is a short example:
(C#)
private void ConfigureDayPilotScheduler2()
{
// Let's set up the timeline
dps2.Scale = TimeScale.Manual;
dps2.Timeline.Clear();
DateTime startDateTime = new DateTime(2016, 8, 15, 3, 0, 0);
// Our scale is 30 minute blocks, so we need 48 of those per day.
// If we want 4 days worth of time, we get 192 (half-hour) cells
for (int i = 0; i < 192; i++)
{
DateTime endDateTime = startDateTime.AddMinutes(30);
if (startDateTime.Hour >= START_HOUR || startDateTime.Hour <= END_HOUR)
dps2.Timeline.Add(startDateTime, endDateTime);
startDateTime = startDateTime.AddMinutes(30);
}
}
(ASPX)
<DayPilot:DayPilotScheduler
ID="dps2"
CellDuration="30"
CellWidth="20"
runat="server">
<TimeHeaders>
<DayPilot:TimeHeader GroupBy="Day" Format="dd MMMM" />
<DayPilot:TimeHeader GroupBy="Hour" Format="HH:mm" />
</TimeHeaders>
<Resources>
<DayPilot:Resource Name="Locations" />
<DayPilot:Resource Name="People"/>
<DayPilot:Resource Name="Tools"/>
</Resources>
</DayPilot:DayPilotScheduler>