fix(calendar): stretch year months grid to full viewport height

This commit is contained in:
Ruslan Bakiev
2026-02-23 15:39:09 +07:00
parent 0bbeef5594
commit cb2d12819c

View File

@@ -170,7 +170,10 @@ defineProps<{
:style="calendarSceneTransformStyle"
@mouseleave="onCalendarSceneMouseLeave"
>
<div class="grid grid-cols-1 gap-2 sm:grid-cols-2 xl:grid-cols-3">
<div
class="grid grid-cols-1 gap-2 sm:grid-cols-2 xl:grid-cols-3 auto-rows-fr"
:style="calendarView === 'year' && calendarViewportHeight > 0 ? { minHeight: `${Math.max(420, calendarViewportHeight)}px` } : undefined"
>
<article
v-for="item in yearMonths"
:key="`year-month-${item.monthIndex}`"
@@ -178,7 +181,7 @@ defineProps<{
class="group relative rounded-xl border border-base-300 p-3 text-left transition calendar-hover-targetable"
:class="[
calendarView === 'year'
? 'hover:border-primary/50 hover:bg-primary/5 cursor-zoom-in'
? 'h-full hover:border-primary/50 hover:bg-primary/5 cursor-zoom-in'
: 'cursor-default min-h-[26rem] bg-base-100 sm:col-span-2 xl:col-span-3',
calendarHoveredMonthIndex === item.monthIndex ? 'calendar-hover-target' : '',
calendarZoomPrimeToken === calendarPrimeMonthToken(item.monthIndex) ? 'calendar-zoom-prime-active' : '',