From f3f88961f01411bae15641c4990dcf6b7c1f502e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:01:41 +0300 Subject: [PATCH] Fixes #17129 --- packages/primeng/src/calendar/calendar.ts | 5 +++++ packages/primeng/src/datepicker/datepicker.ts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/packages/primeng/src/calendar/calendar.ts b/packages/primeng/src/calendar/calendar.ts index 28185374e43..6099efb689b 100644 --- a/packages/primeng/src/calendar/calendar.ts +++ b/packages/primeng/src/calendar/calendar.ts @@ -27,6 +27,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { absolutePosition, addClass, + addStyle, appendChild, blockBodyScroll, find, @@ -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) { diff --git a/packages/primeng/src/datepicker/datepicker.ts b/packages/primeng/src/datepicker/datepicker.ts index 45b0537a0bc..607f198c564 100644 --- a/packages/primeng/src/datepicker/datepicker.ts +++ b/packages/primeng/src/datepicker/datepicker.ts @@ -28,6 +28,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { absolutePosition, addClass, + addStyle, appendChild, blockBodyScroll, find, @@ -3178,6 +3179,10 @@ export class DatePicker extends BaseComponent implements OnInit, AfterContentIni 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) {