Skip to content
DayPilot

AngularJS how to set businessBeginsHour, businessEndsHour and calendar height

Asked by Anonymous
10 years ago.

AngularJS how to set businessBeginsHour, businessEndsHour and calendar height

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

It's supposed to work like this:

        <div ng-app="main" ng-controller="CalendarController" >
          <daypilot-calendar id="calendar" daypilot-config="calendarConfig" daypilot-events="events" ></daypilot-calendar> 
        </div>
        <script>
            var app = angular.module('main', ['daypilot']).controller('CalendarController', ['$scope', '$timeout', '$http', function($scope, $timeout, $http) {
              $scope.calendarConfig = {
                  viewType: "Week",
                  businessBeginsHour: 10,
                  businessEndsHour: 18,
                  heightSpec: "Full",
                  startDate: DayPilot.Date.today()
              };
              
              $scope.events = [];
            }]);
        </script>

DayPilot Lite supports only two heightSpec modes: "BusinessHours", "Full". See also:
http://doc.daypilot.org/calendar/height/

However, there seems to be a bug and setting businessBeginsHour and businessEndsHour with heightSpec: "BusinessHours" only affects how the grid cells are colored but not the total height.

It will be soon.

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