From 9b8b22d3b9c22e552a7fc733f6003afc1e5afaeb Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 8 Jan 2025 13:44:30 +0100 Subject: [PATCH] fix: datepicker when its disabled --- packages/primeng/src/datepicker/datepicker.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/primeng/src/datepicker/datepicker.ts b/packages/primeng/src/datepicker/datepicker.ts index b79c79c527..63da92ea73 100644 --- a/packages/primeng/src/datepicker/datepicker.ts +++ b/packages/primeng/src/datepicker/datepicker.ts @@ -2142,6 +2142,10 @@ export class DatePicker extends BaseComponent implements OnInit, AfterContentIni } onButtonClick(event: Event, inputfield: any = this.inputfieldViewChild?.nativeElement) { + if (this.disabled) { + return; + } + if (!this.overlayVisible) { inputfield.focus(); this.showOverlay();