Skip to content

Commit

Permalink
Merge pull request #16178 from Khalil-Khaled/patch-2
Browse files Browse the repository at this point in the history
Fixed #16176 - Calendar | add checks on panelStyle width and min-width before applying alignOverlay styles
  • Loading branch information
cetincakiroglu authored Aug 8, 2024
2 parents 542abf4 + d74108b commit b68480f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/app/components/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3069,10 +3069,16 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor {
} else if (this.overlay) {
if (this.appendTo) {
if (this.view === 'date') {
this.overlay.style.width = DomHandler.getOuterWidth(this.overlay) + 'px';
this.overlay.style.minWidth = DomHandler.getOuterWidth(this.inputfieldViewChild?.nativeElement) + 'px';
if (!this.overlay.style.width) {
this.overlay.style.width = DomHandler.getOuterWidth(this.overlay) + 'px';
}
if (!this.overlay.style.minWidth) {
this.overlay.style.minWidth = DomHandler.getOuterWidth(this.inputfieldViewChild?.nativeElement) + 'px';
}
} else {
this.overlay.style.width = DomHandler.getOuterWidth(this.inputfieldViewChild?.nativeElement) + 'px';
if (!this.overlay.style.width) {
this.overlay.style.width = DomHandler.getOuterWidth(this.inputfieldViewChild?.nativeElement) + 'px';
}
}

DomHandler.absolutePosition(this.overlay, this.inputfieldViewChild?.nativeElement);
Expand Down

0 comments on commit b68480f

Please sign in to comment.