有人使用ngdatepicker遇到键盘可访问性问题吗?基本上,可以使用Tab键访问输入字段和日历icom按钮。但是焦点不能转到日历中弹出的日期。下面是代码:
<div [formGroup]="formModel" class="form-group">
<label [for]="field.id" class="b2 book">{{field.name}} *
<span *ngIf="showHelp">?</span>
</label>
<div class="input-group">
<input class="form-control" [dayTemplate]="customDay" [id]="field.id" placeholder="YYYY-MM-DD"
formControlName="{{field.id}}" [minDate]="ourMinDate" [startDate]="startDate" name="dp" ngbDatepicker #d="ngbDatepicker" size = "30">
<div class="input-group-append">
<button class="btn btn-outline-secondary dplogo" (click)="d.toggle(); $event.stopPropagation();" (document:click)="closeFix($event, d)" (document:keydown.escape) = "closeFix($event, d)" type="button" style="width: 20px"></button>
</div>
</div>
<app-dynamic-form-error-messages [control]="formModel.controls[field.id]" [field]="field"></app-dynamic-form-error-messages>
</div>
<ng-template #customDay let-date="date" let-currentMonth="currentMonth" let-selected="selected" let-disabled="disabled">
<span class="custom-day" [class.selectedDate]="selected" [class.hiddenDate]="date.month !== currentMonth" [class.disabledDate]="disabled">
{{ date.day }}
</span>