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

Business hours begins and End where can I set them

Asked by Anonymous
3 months ago.

I'm trying to dynamically set the BusinessBeginsHour and BusinessEndsHour in the code behind, but this is just crashing the js and stopping the hours from rendering, and not displaying/Hiding enough rows. I'm trying this in the OnInit override currently.

Is there somewhere else I can get this to work?

fwiw i've tried adding in DayBeginsHour and DayEndsHour values to see if that would help to no avail.

I can replicate the problem by adding:

BusinessBeginsHour = 9;
BusinessEndsHour = 11;

to the demo onInit function in the calendar controller

Answer posted by Dan Letecky [DayPilot]
3 months ago.

What version of DayPilot Pro do you use?

If it doesn't work with the latest version (2021.2.6054), could you please post your config?

The following OnInit() seems to work fine with the latest version (please note that requesting a full update is necessary when changing the config and not just loading events):

protected override void OnInit(InitArgs initArgs)
  BusinessBeginsHour = 9;
  BusinessEndsHour = 11;

  UpdateWithMessage("Welcome!", CallBackUpdateType.Full);
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.