Skip to content

Commit

Permalink
Fixed #11040 - PrimeNG Calendar (p-calendar) Loses alignment when pos…
Browse files Browse the repository at this point in the history
…itioned at the top of the input and the user clicks in the year/month
  • Loading branch information
yigitfindikli committed Feb 9, 2022
1 parent afc0d26 commit 9ba91a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/components/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -912,11 +912,15 @@ export class Calendar implements OnInit,OnDestroy,ControlValueAccessor {

switchToMonthView(event) {
this.currentView = 'month';
this.cd.detectChanges();
this.alignOverlay();
event.preventDefault();
}

switchToYearView(event) {
this.currentView = 'year';
this.cd.detectChanges();
this.alignOverlay();
event.preventDefault();
}

Expand Down

0 comments on commit 9ba91a9

Please sign in to comment.