ui icon indicating copy to clipboard operation
ui copied to clipboard

[bug]: Calendar Component Width is Not Flexible

Open Sepehrworklife opened this issue 1 year ago • 2 comments

Describe the bug

The Calendar component currently has a static size and does not adjust when the width of its container changes. This leads to a suboptimal user experience, especially in responsive designs where the container size might change dynamically based on the viewport or parent component resizing.

shadcnui-pr-not-fixed-1

Expected Behavior

The Calendar component should dynamically resize its cells based on the width of its container. This ensures that the calendar remains responsive and visually consistent across different screen sizes and container widths.

Affected component/components

Calendar

How to reproduce

  1. Render the Calendar component inside a resizable container.
  2. Resize the container.
  3. Observe that the size of the calendar cells does not adjust according to the new width of the container.

---- or -----

  1. Render the Calendar component inside a flex container with a width of more than 600px or less than 200px.
  2. Try to adjust the calendar with full width.

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

- OS: Manjaro OS
- Borwser: Brave Browser

Before submitting

  • [X] I've made research efforts and searched the documentation
  • [X] I've searched for existing issues

Sepehrworklife avatar Jun 14 '24 12:06 Sepehrworklife

I found a solution that I think might help you out on stackoverflow, so have a look at this:https://stackoverflow.com/questions/78196878/how-can-i-make-my-calendar-occupy-the-half-of-my-website-using-shadcn

GiftMothusi avatar Aug 04 '24 10:08 GiftMothusi

@GiftMothusi Thanks for your reply. i have look on the link you provide, seems a good solution. although i had used #3997 solution.

Sepehrworklife avatar Aug 07 '24 09:08 Sepehrworklife

This issue has been automatically marked as stale due to one year of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you. (This is an automated message)

shadcn avatar Aug 07 '25 23:08 shadcn

This issue has been automatically closed due to one year of inactivity. If you’re still experiencing a similar problem or have additional details to share, please open a new issue following our current issue template. Your updated report helps us investigate and address concerns more efficiently. Thank you for your understanding! (This is an automated message)

shadcn avatar Aug 15 '25 23:08 shadcn