diff --git a/components/calendar/__tests__/calendar-toolbar-phone.test.tsx b/components/calendar/__tests__/calendar-toolbar-phone.test.tsx index dc9171553..84f236ce6 100644 --- a/components/calendar/__tests__/calendar-toolbar-phone.test.tsx +++ b/components/calendar/__tests__/calendar-toolbar-phone.test.tsx @@ -42,3 +42,14 @@ describe('phone toolbar in the day view', () => { expect(screen.getByRole('button', { name: 'nav_open_menu' })).toBeInTheDocument(); }); }); + +// At 320px the month title was cut to one letter ("C…") beside the menu, the +// chevrons, Today and the header buttons. +describe('phone toolbar at 320px', () => { + it('gives the period title a line of its own below 25rem', () => { + renderToolbar({ viewMode: 'month' }); + const title = screen.getByText('Oct 2026'); + expect(title).toHaveClass('max-[25rem]:basis-full', 'max-[25rem]:order-first'); + expect(title.parentElement).toHaveClass('flex-wrap'); + }); +}); diff --git a/components/calendar/calendar-toolbar.tsx b/components/calendar/calendar-toolbar.tsx index 2fbc506ab..f67c49bb3 100644 --- a/components/calendar/calendar-toolbar.tsx +++ b/components/calendar/calendar-toolbar.tsx @@ -232,8 +232,10 @@ export function CalendarToolbar({