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

BusinessBeginsHour & BusinessEndsHour - is it possible to have half hours?

Asked by Tom
12 years ago.
Hi,

I am just wondering if it is possible to have BusinessBeginsHour & BusinessEndsHour in periods depending on your Cell Duration?

eg.
CellDuration="15"
BusinessBeginsHour="9"
BusinessEndsHour="17:30"
Comment posted by Dan Letecky
12 years ago.
It's possible but you need to use another trick: Handle BeforeCellRender event and change e.IsBusiness according to your needs. BeforeCellRender is called for each cell (the cell is specified by e.Start, e.End, and e.ResourceId properties).

You will find a working example in Demo/Calendar/CustomBusinessHours.aspx.cs in the download package.
Comment posted by Mike
12 years ago.
That workaround works for the highlighting, but is there a way to have the calendar render according to these adjusted business hours when in Resources view? i.e. the visible area is adjusted to show the time between these new business half-hours?
Comment posted by Dan Letecky
12 years ago.
Business hours only work with hour units (i.e. it can't end 17:30).

In DayPilotCalendar and DayPilotSchedulerDynamic, you are able to hide non-business hours (see topic 300). You would still have to use the highlighting for the remaining 30 minute block.
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.