diff --git a/src/app/components/calendar/calendar.ts b/src/app/components/calendar/calendar.ts index 1a7d7ccfd08..37fd1cd6592 100644 --- a/src/app/components/calendar/calendar.ts +++ b/src/app/components/calendar/calendar.ts @@ -1995,8 +1995,12 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor { if (this.inline) { const headerElements = DomHandler.findSingle(this.containerViewChild?.nativeElement, '.p-datepicker-header'); const element = event.target; - if (element == headerElements.children[headerElements.children.length - 1]) { - this.initFocusableCell(); + if (this.timeOnly) { + return; + } else { + if (element == headerElements.children[headerElements?.children?.length - 1]) { + this.initFocusableCell(); + } } } break;