Display 15 30 45 minutes
15 years ago.
If I keep the cell duration as 5 minutes I see 12 slots between any 2 hours.How can I display 15, 30 & 45 mins between any 2 hours.
Thanks
If I keep the cell duration as 5 minutes I see 12 slots between any 2 hours.How can I display 15, 30 & 45 mins between any 2 hours.
Thanks
In the Calendar, it's only possible to use CellDuration values that divide an hour without any remainder. I.e. setting CellDuration="45" wouldn't work.
In the Scheduler, it's possible to use any positive integer value as CellDuration.
It's also possible to hide individual columns in the Scheduler using BeforeTimeHeaderRender (set e.Visible = false) and ShowNonBusiness=false. See also:
http://www.daypilot.org/scheduler-hiding-non-business-hours.html
No you did not get the question right. I don't want to set the cell duration to 45 minutes. I want to set the cell duration as 5 mins. So between any 2 hours I will see 12 lines each line indication 5 minutes. Is there a way to display labels for 15, 30 and 45 minutes between any 2 hours.
See below
8 am
15-
30-
45-
9 am
I see. You can do this using BeforeTimeHeaderRender event handler:
http://kb.daypilot.org/75335/how-to-show-precise-time-in-the-calendar-row-headers/
Perfect thanks. Can this be a standard feature like the others?
I'm adding it to the wishlist.
Has this "wish list" item been implemented in a better way or can you give me an example of how to do this using the DayPilotScheduler
OK so I figured it out, but sure would be nice if there were an easier way.
protected override void OnBeforeTimeHeaderRender(BeforeTimeHeaderRenderArgs e)
{
if (e.IsColGroup == false)
{ // not the date header column - format the time header to show hrs & mins, not just mins
e.ToolTip = e.Start.ToShortTimeString();
// extract the <span> definition so we can replicate the same html for each timeslot
String html = e.InnerHtml;
int index = html.IndexOf(">");
e.InnerHtml = html.Substring(0, index + 1) + e.ToolTip + "</span>";
}
}
Just for reference, there are two new features related to displaying the time scale.
Calendar
You can adjust the duration of the time header cells using TimeHeaderCellDuration property. This used to be fixed to 60 minutes (one cell per hour in the time header)
This is supported since 7.1 release: http://www.daypilot.org/daypilot-pro-for-asp-net-webforms-7-1.html
See a demo here: http://www.daypilot.org/demo/Calendar/TimeHeaderCellDuration.aspx
Scheduler
You can add multiple levels to the time header using TimeHeaders property. There used to be only one "group" level available, with the scale determined by CellGroupBy property.
This is supported since 6.9 release: http://www.daypilot.org/daypilot-pro-for-asp-net-webforms-6-9.html
See a demo here: http://www.daypilot.org/demo/Scheduler/TimeHeaders.aspx
The customization of the cell content has to be done using On/BeforeTimeHeaderRender.
This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.
DayPilot