Skip to content
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

fix(date-picker): resolve width clipping issue on 90/110% zoom #3416

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/metal-bats-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/date-picker": patch
---

Fixed bug of date-picker width clipped when zoom 90%
4 changes: 2 additions & 2 deletions packages/core/theme/src/components/date-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const datePicker = tv({
selectorButton: "-mr-2 text-inherit",
selectorIcon: "text-lg text-inherit pointer-events-none flex-shrink-0",
popoverContent: "p-0 w-full",
calendar: "w-[var(--calendar-width)] shadow-none",
calendarContent: "w-[var(--calendar-width)]",
calendar: "w-[256px] shadow-none",
calendarContent: "w-[256px]",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the section where --calendar-width is set.

"--calendar-width": calendarWidth,

It should look like this:

"--calendar-width": typeof calendarWidth === "number" ? `${calendarWidth}px` : calendarWidth,

Additionally, it would be gread if you could add a Storybook example where the calendarWidth prop is specified as a number.

timeInputLabel: "font-medium",
timeInput: "px-5 pb-4 flex-wrap gap-x-6",
},
Expand Down