Skip to content

Commit

Permalink
Fixed #17129 - DatePicker: Styles not working
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Dec 19, 2024
1 parent b963208 commit 8dd5f20
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/primeng/src/datepicker/datepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import {
absolutePosition,
addClass,
addStyle,
appendChild,
blockBodyScroll,
find,
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 8dd5f20

Please sign in to comment.