119 lines
4.8 KiB
HTML

<div class="isp-datepicker-routing-view" #ispDatepickerRoutingView (keydown.tab)="onKeyDownTab()">
<div [ngSwitch]="currentTemplate">
<!-- giorni -->
<div *ngSwitchCase=0>
<!-- mesi nell'header. -->
<div *ngIf="showWeekdays" class="ngb-dp-week d-flex" role="row" [attr.aria-hidden]="true">
<div *ngIf="showWeekNumbers" class="ngb-dp-weekday"></div>
<div *ngFor="let w of month.weekdays" class="ngb-dp-weekday small text-center text-info font-italic" [attr.aria-hidden]="true">
<span [attr.role]="'columnheader'" [attr.aria-labelledby]="''">
{{ i18n.getWeekdayShortName(w) | translate | uppercase | slice: 0:3 }}
</span>
</div>
</div>
<ng-template ngFor let-week [ngForOf]="month.weeks">
<div *ngIf="!isCollapsed(week) && !isHiddenWeek(week)" class="ngb-dp-week d-flex" role="row">
<div *ngIf="showWeekNumbers" class="ngb-dp-week-number small text-center font-italic text-muted">
<span [attr.role]="'columnheader'" [attr.aria-label]="''">{{ week.number }}</span>
</div>
<div *ngFor="let day of week.days" (click)="doSelect(day, $event)" class="ngb-dp-day"
[class.disabled]="day.context.disabled"
[class.hidden]="isHidden(day)"
[class.tab-focused]="day.context.focused && tabFocusVisible"
[attr.aria-label]="''">
<ng-template [ngIf]="!isHidden(day)">
<div ngbFidDatepickerDayView
[ngClass] = "{'cursor-pointer' : !disabledWeekend && !day.context.disabled}"
[date]="day.context.date"
[currentMonth]="day.context.currentMonth"
[selected]="day.context.selected"
[disabled]="day.context.disabled"
[focused]="day.context.focused"
[startDateEnabled]="startDateEnabled"
[endDateEnabled]="endDateEnabled"
[isToday]="day.context.isToday"
[isWeekend]="day.context.isWeekend"
[isHoliday]="day.context.isHoliday"
[taxDeadlines]="taxDeadlines"
[isFiscalDay]="day.context.isFiscalDay"
[attr.role]="'cell'"
[attr.aria-selected]="day.context.selected"
[attr.tabindex]="isActiveCell(day)"
[labelText]="i18n.getAriaLabelDaysTabularForm(day)"
[attr.aria-label]="i18n.getAriaLabelDays(day)"
[attr.aria-labelledby]="''"
[attr.aria-describedby]="''">
</div>
</ng-template>
</div>
</div>
</ng-template>
</div>
<!-- mesi -->
<div *ngSwitchCase=1>
<div *ngFor="let line of mesi" class="d-flex ngb-dp-mese" role="row">
<ng-container *ngFor="let mese of line">
<div ngbFidDatepickerReplyMonthView
[mese]="mese"
[year]="dataTemplate.year"
[selected]="mese.selected"
[disabled]="mese.disabled"
[focused]="mese.focused"
[mounthFocusVisible]="tabFocusVisible"
[startDateEnabled]="startDateEnabled"
[endDateEnabled]="endDateEnabled"
[attr.role]="'cell'"
type='button'
[labelText]="i18n.getAriaLabelMonthTabularForm(mese.name, dataTemplate.year)"
[attr.aria-label]="i18n.getAriaLabelMonth(mese.name, dataTemplate.year)"
[attr.aria-selected]="mese.selected"
[attr.aria-labelledby]="''"
[attr.aria-describedby]="''"
(click)="doSelectMonth(mese, $event)">
</div>
</ng-container>
</div>
</div>
<!-- anni -->
<div *ngSwitchCase=2>
<div *ngFor="let line of years" class="d-flex ngb-dp-mese" role="row">
<ng-container *ngFor="let year of line">
<div ngbFidDatepickerReplyYearsView [year]="year" [selected]="year.selected" [disabled]="year.disabled"
[focused]="year.focused"
[startDateEnabled]="startDateEnabled"
[endDateEnabled]="endDateEnabled"
[attr.aria-selected]="year.selected"
[attr.role]="'cell'"
type='button'
[attr.aria-label]="i18n.getAriaLabelYear(year.name)"
[attr.aria-labelledby]="''"
[attr.aria-describedby]="''"
[labelText]="i18n.getAriaLabelYearTabularForm(year.name)"
[yearFocusVisible]="tabFocusVisible"
(click)="doSelectYear(year, $event)">
</div>
</ng-container>
</div>
</div>
<!-- default -->
<div *ngSwitchDefault>errore template</div>
</div>
<div>
<button>Oggi</button><button>Cancella</button><button>Chiudi</button>
</div>
</div>