I am using the trial version of DayPilot Pro V4.1 and I have set the business hours to 5 AM to 11 PM. If I create an event scheduled from 9:00 PM to 10:00 PM and try to look up in a 1 day view, the event does not show up. If I change the view to 5 days then it shows me that event.
Can anyone tell me what is happening here?
Also, how can I make Saturday & Sunday as bussiness days? Right now, if I change the color of NonBusinessHours, Saturdays & Sundays are displayed in NonBusinessHours color.
Gaurav
-
11/2/2007 4:57:53 PM
We are discussing #1 directly.
For #2, you should use BeforeCellRender event and change either e.IsBusiness property or e.BackgroundColor directly.
Thank you! It worked!
For #1 -there was aproblem with my data source. Fixed the data source and now the event does show up.
Gaurav
-
11/9/2007 7:32:53 PM
would you mind posting an example of how you checked if it was saturday or sunday and then turned it into a business day? i'm having difficulty doing exactly what you did. When i'm doing the beforecellrenderEvent its turning all hours and all days into business days. thanks!
Anonymous
-
11/16/2007 6:48:03 PM
Use the following code to make Sat/Sun 9 AM - 6 PM business hours:
protected void DayPilotCalendar1_BeforeCellRender(object sender, BeforeCellRenderEventArgs e)
{
if ((e.Start.DayOfWeek == DayOfWeek.Saturday || e.Start.DayOfWeek == DayOfWeek.Sunday)
|| (e.Start.Hour >= 9 && e.Start.Hour < 18))
{
e.IsBusiness = true;
}
}