-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
fix(calendar): remove unnecessary width class from day element (#7894) #7928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Someone is attempting to deploy a commit to the shadcn-pro Team on Vercel. A member of the Team first needs to authorize it. |
|
I recenlty spotted this issue too! |
|
While this fixes the end of month issue, it introduces a regression at the start of month where days are no longer correctly aligned. Problem with Current Fix
The issue is that completely removing the Root CauseThe original problem (#7894) occurs because Suggested SolutionInstead of removing all width constraints, we should use a more targeted approach: day: cn(
"group/day relative aspect-square h-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",
"w-auto [tr:first-child_&]:w-full",
defaultClassNames.day
)This should preserve start-of-month alignment while avoiding end-of-month overflow. |
|
I have taken your feedback into consideration. |
|
oh I also had this issue thank for offering the fix |



Fixed the calendar component when
endMonthproperty is added.Fixes: #7894
For example: on a current calendar, when you add the endMonth property

Now with fix:
