Skip to content

Commit

Permalink
Fixed #17125 and #17129
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Dec 19, 2024
1 parent 8dd5f20 commit 0f7673b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/primeng/src/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import {
absolutePosition,
addClass,
addStyle,
appendChild,
blockBodyScroll,
find,
Expand Down Expand Up @@ -489,8 +490,8 @@ export const CALENDAR_VALUE_ACCESSOR: any = {
</div>
</div>
<div class="p-datepicker-buttonbar" *ngIf="showButtonBar">
<p-button size="small" styleClass="p-datepicker-today-button" [label]="getTranslation('today')" (keydown)="onContainerButtonKeydown($event)" (onClick)="onTodayButtonClick($event)" [ngClass]="[todayButtonStyleClass]" />
<p-button size="small" styleClass="p-datepicker-clear-button" [label]="getTranslation('clear')" (keydown)="onContainerButtonKeydown($event)" (onClick)="onClearButtonClick($event)" [ngClass]="[clearButtonStyleClass]" />
<p-button size="small" styleClass="p-datepicker-today-button" [label]="getTranslation('today')" (keydown)="onContainerButtonKeydown($event)" (onClick)="onTodayButtonClick($event)" [ngClass]="todayButtonStyleClass" />
<p-button size="small" styleClass="p-datepicker-clear-button" [label]="getTranslation('clear')" (keydown)="onContainerButtonKeydown($event)" (onClick)="onClearButtonClick($event)" [ngClass]="clearButtonStyleClass" />
</div>
<ng-content select="p-footer"></ng-content>
<ng-container *ngTemplateOutlet="footerTemplate || _footerTemplate"></ng-container>
Expand Down Expand Up @@ -3172,6 +3173,10 @@ export class Calendar extends BaseComponent implements OnInit, AfterContentInit,
if (!this.inline) {
this.overlay = event.element;
this.overlay?.setAttribute(this.attributeSelector as string, '');
const styles = !this.inline ? { position: 'absolute', top: '0', left: '0' } : undefined;

addStyle(this.overlay, styles);

this.appendOverlay();
this.updateFocus();
if (this.autoZIndex) {
Expand Down

0 comments on commit 0f7673b

Please sign in to comment.