Skip to content

Commit 1ab2689

Browse files
committed
fix(persian-calendar): update day cell styles for last child handling in aspect ratio
1 parent d8d3e9f commit 1ab2689

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

dashboard/src/components/ui/calendar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function Calendar({
6262
week_number: cn('text-muted-foreground select-none text-[0.8rem]', defaultClassNames.week_number),
6363
day: cn(
6464
'group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md',
65-
'[tr:has(td:only-child)_&]:aspect-auto [tr:has(td:only-child)_&]:w-[calc(100%/7)]',
65+
'[tr:has(td:last-child:not(:nth-child(7)))_&]:aspect-auto [tr:has(td:last-child:not(:nth-child(7)))_&]:w-[calc(100%/7)]',
6666
defaultClassNames.day,
6767
),
6868
range_start: cn('bg-accent rounded-l-md', defaultClassNames.range_start),

dashboard/src/components/ui/persian-calendar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ function Calendar({
6464
week_number: cn('text-muted-foreground select-none text-[0.8rem]', defaultClassNames.week_number),
6565
day: cn(
6666
'group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md',
67-
defaultClassNames.day,
67+
'[tr:has(td:last-child:not(:nth-child(7)))_&]:aspect-auto [tr:has(td:last-child:not(:nth-child(7)))_&]:w-[calc(100%/7)]',
68+
defaultClassNames.day,
6869
),
6970
range_start: cn('bg-accent rounded-l-md', defaultClassNames.range_start),
7071
range_middle: cn('rounded-none', defaultClassNames.range_middle),

0 commit comments

Comments
 (0)