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

Unable to hide non business hours

Asked by Shubham
7 years ago.

I am integrating Daypilot scheduler on angular platform, but somehow I am unable to hide non business hours from the scheduler, here is the code :
$scope.weekConfig = {
viewType: "Week",
scale: "day",
headerDateFormat : "ddd",
weekStarts : 1,
showNonBusiness : false,
businessBeginsHour: 8,
businessEndsHour: 18
}
I am amazed, all the other functionality of daypilot working properly except that showNonBusiness : false section, please help me out.

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

In the Calendar control this functionality is not controlled by "showNonBusiness" but using heightSpec property.

In fact, there are two options:

1. Use heightSpec: "BusinessHoursNoScroll"
https://doc.daypilot.org/calendar/height/

This will display the business hours in full (8-18), no vertical scrollbar will be displayed.

2. You can also customize it using dayBeginsHour and dayEndsHour. This will let you hide specific hours of day but still display the vertical scrollbar.

Example:
$scope.weekConfig = { 
  viewType: "Week", 
  scale: "day", 
  headerDateFormat : "ddd", 
  weekStarts : 1, 
  showNonBusiness : false, 
  businessBeginsHour: 8, 
  businessEndsHour: 18 ,
  dayBeginsHour: 6,
  dayEndsHour: 20
} 
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.