From 7be803caf5bd5d2910486c73c361ad18e8cd1c8f Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Mon, 21 Jul 2025 09:07:43 +0200 Subject: [PATCH] fix(material/datepicker): focus lost when hitting the end of calendar If the user hits the end of the calendar (e.g. when a min/max date is set), we disable the calendar button which causes focus to be returned to the `body`. These changes use `disabledInteractive` on the buttons so that focus stays on the button. --- src/material/datepicker/calendar-header.html | 4 +-- .../datepicker/calendar-header.spec.ts | 12 +++---- src/material/datepicker/calendar.spec.ts | 16 +++++++--- src/material/datepicker/calendar.ts | 32 +++++++++++-------- 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/src/material/datepicker/calendar-header.html b/src/material/datepicker/calendar-header.html index 2ffe6c6d1dd6..ee72dd31189c 100644 --- a/src/material/datepicker/calendar-header.html +++ b/src/material/datepicker/calendar-header.html @@ -20,7 +20,7 @@