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

AngularJS how to set businessBeginsHour, businessEndsHour and calendar height

Asked by Anonymous
4 years ago.

AngularJS how to set businessBeginsHour, businessEndsHour and calendar height

Answer posted by Dan Letecky [DayPilot]
4 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.

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

This issue is now fixed in the latest DayPilot Lite for JavaScript release:
http://javascript.daypilot.org/daypilot-lite-for-javascript-1-3-sp2/

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