Skip to content

Commit

Permalink
Merge pull request primefaces#16815 from primefaces/issue-16720
Browse files Browse the repository at this point in the history
Fixed primefaces#16720 | DatePicker Component - Error on Month Switch: Cannot r…
  • Loading branch information
mehmetcetin01140 authored Nov 22, 2024
2 parents 81f7049 + 8952923 commit 33be5c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/primeng/src/datepicker/datepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2546,8 +2546,8 @@ export class DatePicker extends BaseComponent implements OnInit, OnDestroy, Cont
if (this.navigationState.button) {
this.initFocusableCell();

if (this.navigationState.backward) (findSingle(this.contentViewChild.nativeElement, '.p-datepicker-prev') as any).focus();
else (findSingle(this.contentViewChild.nativeElement, '.p-datepicker-next') as any).focus();
if (this.navigationState.backward) (findSingle(this.contentViewChild.nativeElement, '.p-datepicker-prev-button') as any).focus();
else (findSingle(this.contentViewChild.nativeElement, '.p-datepicker-next-button') as any).focus();
} else {
if (this.navigationState.backward) {
let cells;
Expand Down Expand Up @@ -3753,7 +3753,7 @@ export class DatePicker extends BaseComponent implements OnInit, OnDestroy, Cont
}

isNavIconClicked(event: any) {
return hasClass(event.target, 'p-datepicker-prev') || hasClass(event.target, 'p-datepicker-prev-icon') || hasClass(event.target, 'p-datepicker-next') || hasClass(event.target, 'p-datepicker-next-icon');
return hasClass(event.target, 'p-datepicker-prev-button') || hasClass(event.target, 'p-datepicker-prev-icon') || hasClass(event.target, 'p-datepicker-next-button') || hasClass(event.target, 'p-datepicker-next-icon');
}

onWindowResize() {
Expand Down

0 comments on commit 33be5c4

Please sign in to comment.