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

Events scheduled from 9:00 PM onwards do not show up in a one day view

Asked by Gaurav
12 years ago.

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.

Comment posted by Dan Letecky
12 years ago.
We are discussing #1 directly.

For #2, you should use BeforeCellRender event and change either e.IsBusiness property or e.BackgroundColor directly.
Comment posted by Gaurav
12 years ago.

Thank you! It worked!

For #1 -there was aproblem with my data source. Fixed the data source and now the event does show up.

Comment posted by Anonymous
12 years ago.
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!
Comment posted by Dan Letecky
12 years ago.
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;
}
}
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.