From 01bbf27c1cae5efac464d0ae94baf982ad781f92 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Wed, 20 May 2026 09:32:14 +0200 Subject: [PATCH] fix(material/datepicker): ensure dates don't overflow on a small screen Fixes that a datepicker in touch UI mode might overflow on a small screen in horizontal orientation. Fixes #33115. --- src/material/datepicker/datepicker-content.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/material/datepicker/datepicker-content.scss b/src/material/datepicker/datepicker-content.scss index 9af13a593af4..c22c5d6e0152 100644 --- a/src/material/datepicker/datepicker-content.scss +++ b/src/material/datepicker/datepicker-content.scss @@ -119,6 +119,10 @@ $touch-max-height: 788px; // Prevents the content from jumping around on Windows while the animation is running. overflow: visible; + // Prevent the content from shrinking to a point where it doesn't fit all the dates anymore. + // stylelint-disable material/no-prefixes + min-height: fit-content; + &.mat-datepicker-content-animations-enabled { animation: _mat-datepicker-content-dialog-enter 150ms cubic-bezier(0, 0, 0.2, 1); }