From 8dd5f2072c648da659f00a9dbb89a828f23236d4 Mon Sep 17 00:00:00 2001 From: Mert Sincan Date: Thu, 19 Dec 2024 11:52:31 +0000 Subject: [PATCH] Fixed #17129 - DatePicker: Styles not working --- packages/primeng/src/datepicker/datepicker.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/primeng/src/datepicker/datepicker.ts b/packages/primeng/src/datepicker/datepicker.ts index 3631d5d73a..59b2299a5a 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) {