All files / element-ng/datepicker/components si-day-selection.component.html

100% Statements 48/48
100% Branches 4/4
100% Functions 9/9
100% Lines 34/34

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77127x 127x   278x   127x   127x       127x   278x 127x 127x     127x   278x 127x   127x   278x   127x     127x       278x 127x 272x     278x 889x 1946x     127x   127x     278x                 127x 2x 13x     127x     127x       278x 127x   278x 127x    
<div class="header">
  <si-calendar-direction-button
    direction="left"
    [ariaLabel]="previousLabel() | translate"
    [disabled]="isPreviousButtonDisabled()"
    (clicked)="setMonthOffset(-1)"
  />
  <div class="flex-fill">
    <button
      type="button"
      class="open-month-view flex-fill text-end px-4 btn btn-tertiary calendar-button"
      (click)="emitViewChange('month')"
    >
      {{ focusedDate() | date: 'MMMM' }}
    </button>
    <button
      type="button"
      class="open-year-view flex-fill text-start px-4 btn btn-tertiary calendar-button"
      (click)="emitViewChange('year')"
    >
      {{ focusedDate() | date: 'yyyy' }}
    </button>
  </div>
  <si-calendar-direction-button
    direction="right"
    [ariaLabel]="nextLabel() | translate"
    [disabled]="isNextButtonDisabled()"
    (clicked)="setMonthOffset(1)"
  />
</div>
<div class="calendar-table">
  <table class="px-9" role="grid">
    <thead class="si-calendar-table-header">
      <tr>
        @if (!hideWeekNumbers()) {
          <th scope="col" class="week-num">
            <span class="visually-hidden">{{ calendarWeekLabel() | translate }}</span>
          </th>
        }
        @for (day of days(); track $index) {
          <th scope="col">
            <span class="si-hidden-xs si-hidden-sm">{{ day }}</span>
          </th>
        }
      </tr>
    </thead>
    <tbody
      si-calendar-body
      rowLabelCssClasses="week-num"
      [focusedDate]="focusedDate()"
      [compareAdapter]="compareAdapter"
      [startDate]="startDate()"
      [endDate]="endDate()"
      [enableRangeSelection]="isRangeSelection()"
      [previewRange]="previewRange()"
      [rows]="weeks()"
      [rowLabels]="hideWeekNumbers() ? undefined : weekNumbers()"
      [activeHover]="activeHover()"
      (activeHoverChange)="onActiveHoverChange($event)"
      (selectedValueChange)="emitSelectedValue($event)"
      (focusedDateChange)="emitActiveDate($event!)"
      (keydown)="calendarBodyKeyDown($event)"
    >
    </tbody>
  </table>
</div>
<div class="footer ps-8 pe-8">
  <button
    type="button"
    class="today-button btn btn-tertiary flex-fill"
    [disabled]="isTodayButtonDisabled()"
    (click)="goToToday()"
  >
    {{ today() | translate }}
  </button>
</div>