Hello Dan,
I was wondering if there is a way to render Daypilot so that it would only display the cells for business hours, ie from 8AM - 5PM and not 12AM to 11PM. It's a bit of a nitpick, but our clients would prefer just having the times that are(their)business hours to work with, and not having to scroll down large amounts when the intervals are small (say 5 minutes). I looked through to see if there is a functionality such as hiding cells or just turning off rows altogether, but there doesn't seem to be this feature. If thereisI'd love to know how to implement it. Thank you.
Also, I was using ScrollPositionHour as a temporary solution, but I noticed that whenever I switch time intervals and do a callback, daypilot does not automatically scroll to the businesshour (8AM) in this case. This is especially true on 5 and 10 min intervals, which I've been testing on - they usually start me off at 2AM or 3AM if the first business hour is 8AM.
Thanks Dan, it worked great. Just to clarify for others who may have same problem, you need to use DayPilot.Web.Ui.Enums.HeightSpecEnum.BusinessHoursNoScroll and not DayPilot.Web.Ui.Enums.HeightSpecEnum.BusinessHours. Afterwards, set the following times:
DayPilotCalendar1.BusinessBeginsHour = 8 DayPilotCalendar1.BusinessEndsHour = 17
The user will only be able to see the business hours time block. This is exactly what I'm looking for. Thank you.
Upon further investigation, it works with the exception of a small bug (in IE7 only I'm assuming):
the columns and the header in Daypilot calendar are not lining up. This only occurs the first time, as after each subsequent refresh, the calendar looks ok. I mentioned this issue when I tried to change heightspec to "full" mode as well.
Are there any plans to fix this bug in a future release?
Glad to hear it'll be fixed soon. =)
A quick workaround I've used is to put this in javascript:
Page.ClientScript.RegisterStartupScript(this.GetType(), "refresh", "window.location.href=window.location;", true);
So when your page first loads, javascript will cause the page to refresh, and daypilot calendar will be rendered correctly. I know this isn't the best way to go about doing things, but it's a quick fix until the next release for those interested.
Hi all,
I'm using version 4.1.1252.1 of DayPilot within visual studio 2005 sp1. When I change the .ScrollPositionHour with .HeightSpec = Fixed (or = BusinessHours) and then databind/update, no scroll change is happening.
From what I've read in this thread this seems to be an issue identified previously, but there's no mention of it being resolved in any version. Has it been resolved? I've checked the online notes against each release version and can find no mention.
Please can you let me know if it has been resolved, or will be resolved.
Cheers for now
David
dpc.$('scroll').scrollTop = valueInPixels;
protected void Page_Load(object sender, EventArgs e) { DateTime first = new DateTime(2007, 1, 1); for (int i = 0; i < 7; i++) { Column c = new Column(); DateTime date = first.AddDays(i); if (date.DayOfWeek == DayOfWeek.Wednesday || date.DayOfWeek == DayOfWeek.Friday) continue; c.Name = date.ToShortDateString(); c.Date = date; DayPilotCalendar1.Columns.Add(c); } }