Skip to content

Commit

Permalink
Fixed #13736 - Update condition to prevent highlight disabled date
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Sep 25, 2023
1 parent ae1c5d7 commit b2c5499
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const CALENDAR_VALUE_ACCESSOR: any = {
</td>
<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>
<span [ngClass]="{ 'p-highlight': isSelected(date) && date.selectable, 'p-disabled': !date.selectable }" (click)="onDateSelect($event, date)" draggable="false" (keydown)="onDateCellKeydown($event, date, i)" pRipple>
<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>
Expand Down

0 comments on commit b2c5499

Please sign in to comment.