Skip to content

Commit

Permalink
Merge pull request #13733 from ashikjs/issues/13695/calender-siabled-…
Browse files Browse the repository at this point in the history
…date-template-not-working

fix: #13695 || Calendar: disabledDate Template Broken
  • Loading branch information
cetincakiroglu committed Sep 25, 2023
2 parents 360e549 + fa3cca6 commit ae1c5d7
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

1 comment on commit ae1c5d7

@vercel
Copy link

@vercel vercel bot commented on ae1c5d7 Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.