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

Scheduler with custom Timeline and TimeHeaders

Asked by Ian
7 years ago.

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>

Comment posted by Ian
7 years ago.

Using Pro v7.7 btw.

Answer posted by Dan Letecky [DayPilot]
7 years ago.

It seems to work fine with the latest version (8.2). Can you please give it a try?

http://www.daypilot.org/try/

Comment posted by Ian
7 years ago.

Thanks Dan, you're right the latest version works. Is there a patch, or upgrade option available? Or is the only option to buy the product again?

Comment posted by Ian
7 years ago.

Scratch that, I've sent an email to your sales address.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.