Skip to content

Commit

Permalink
fix: #13695 || Calendar: disabledDate Template Broken
Browse files Browse the repository at this point in the history
  • Loading branch information
ashikjs committed Sep 25, 2023
1 parent 396297a commit fa3cca6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/app/components/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,13 @@ export const CALENDAR_VALUE_ACCESSOR: any = {
<td *ngFor="let date of week" [ngClass]="{ 'p-datepicker-other-month': date.otherMonth, 'p-datepicker-today': date.today }">
<ng-container *ngIf="date.otherMonth ? showOtherMonths : true">
<span [ngClass]="{ 'p-highlight': isSelected(date), 'p-disabled': !date.selectable }" (click)="onDateSelect($event, date)" draggable="false" (keydown)="onDateCellKeydown($event, date, i)" pRipple>
<ng-container *ngIf="!dateTemplate">{{ date.day }}</ng-container>
<ng-container *ngTemplateOutlet="dateTemplate; context: { $implicit: date }"></ng-container>
<ng-container *ngIf="!dateTemplate && (date.selectable || !disabledDateTemplate)">{{ date.day }}</ng-container>
<ng-container *ngIf="date.selectable || !disabledDateTemplate">
<ng-container *ngTemplateOutlet="dateTemplate; context: { $implicit: date }"></ng-container>
</ng-container>
<ng-container *ngIf="!date.selectable">
<ng-container *ngTemplateOutlet="disabledDateTemplate; context: { $implicit: date }"></ng-container>
</ng-container>
</span>
</ng-container>
</td>
Expand Down

0 comments on commit fa3cca6

Please sign in to comment.