<div>
  <div>
    <table class="table table-bordered table-fixed monthview-datetable monthview-datetable">
      <thead>
        <tr>
          <th data-ng-if="grouping && groupingdir !== 'desc'" class="calendar-sort-column" data-ng-click="setGroupingDir('desc')">
            {{groupingcfg[grouping]}}&nbsp;<i class="fa fa-sort-asc"></i>
          </th>
          <th data-ng-if="grouping && groupingdir === 'desc'" class="calendar-sort-column" data-ng-click="setGroupingDir('asc')">
            {{groupingcfg[grouping]}}&nbsp;<i class="fa fa-sort-desc"></i>
          </th>
          <th ng-show="showWeeks" class="calendar-week-column text-center" data-bs-placement="auto right"
            data-bs-toggle="tooltip" data-bs-title="{{ 'week number' | translate }}">#</th>
          <th ng-repeat="label in labels track by $index" class="text-center">
            <small>{{label}}</small>
          </th>
          <th class="gutter-column" ng-style="{width: scrollBarWidth+'px'}"></th>
        </tr>
      </thead>
    </table>
  </div>
  <div id="scrollmonthview" class="scrollable" data-ng-style="{'height': getHeight(45)}">
    <table class="table table-bordered table-fixed monthview-datetable monthview-datetable">
      <tbody data-ng-repeat="cat in categories track by cat">
        <tr ng-repeat="row in rows track by $index" data-row="{{cat}}">
          <td data-ng-if="grouping && $index == 0" rowspan="{{ rows.length }}">{{cat}}</td>
          <td ng-show="showWeeks" class="calendar-week-column text-center">
            <small>{{ weekNumbers[$index] }}</small>
          </td>
          <td ng-repeat="dt in row track by dt.date" class="text-center datecell" data-date="{{dt.date| date: 'yyyy-MM-dd'}}">
            <div>
              <p><strong>{{dt.label}}</strong></p>
              <div ng-repeat="opplan in dt.events track by $index" data-ng-if="(!grouping || (opplan[grouping] || '') == (cat || '')) && displayEvent(opplan,dt)" class="card-month" ng-click="selectCard(opplan)">
                <ng-include src="'/input/card.html'" />
              </div>
            </div>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>