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

How to show 22PM to 7AM as businesshours within a calender?

Asked by Gabriel
13 years ago.

Hi,

My client has several shifts, one of these is the nightshift that starts at 22pm.
When I enter day 1, 22pm as the startday and day 2, 7am as the enddate and fill the begin/end businesshours property accordingly the calender only show 22pm till 23pm.

Is there any way to configure the calender to show the entire nightshift as if it were one day?

Thanks in advance.

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

You can override IsBusiness status using BeforeCellRender event handler. This event is called for each calendar cell. You need to check the e.Start value and set e.IsBusiness as needed.

See also:

You might also want to take a look at DayBeginsHour property - that allows you to shift the first visible hour from the default 0. It will show the subsequent 24 hours so you will be able to see this night shift in a single column.

Comment posted by LaTiNo
13 years ago.

Hello,

I tried doing this using this parameters

schRoutes.Days = 2
schRoutes.StartDate = '24-10-2011'
schRoutes.DayBeginsHour = 22
schRoutes.BusinessBeginsHour = 22
schRoutes.BusinessEndsHour = 7

Unfortunately the control doesn't accept schRoutes.BusinessEndsHour = 7, it automatically changes this to 23.
Also there is no 'DayEndsHour'. So it ends up showing 22:00 to 23:00 off 24-10-2011

Is there ANY way to show all appointments from 10:00PM to 7:00AM the next day?

Comment posted by Dan Letecky [DayPilot]
13 years ago.

You should use DayEndsHour property which is available since relase 6.5 (August 18, 2011):

http://www.daypilot.org/daypilot-pro-6-5.html

Please let me know if there is any problem (support@daypilot.org).

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