Skip to content

Commit

Permalink
fix(date-picker): adding props from calendarProps to getCalendarProps (
Browse files Browse the repository at this point in the history
…#3773)

* fix(date-picker): adding props from calendarProps to the getCalendarProps

* chore(date-picker): adding the changeset

* chore(changeset): add issue number

---------

Co-authored-by: Maharshi Alpesh <maharshialpesh@Maharshi-Book.local>
Co-authored-by: WK Wong <wingkwong.code@gmail.com>
  • Loading branch information
3 people authored Oct 1, 2024
1 parent e308198 commit a4ab020
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/flat-pants-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/date-picker": patch
---

Fixes getCalendarProps to propagate the classNames in the calendarProps. (#3769)
7 changes: 5 additions & 2 deletions packages/components/date-picker/src/use-date-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,11 @@ export function useDatePicker<T extends DateValue>({
...ariaCalendarProps,
...calendarProps,
classNames: {
base: slots.calendar({class: classNames?.calendar}),
content: slots.calendarContent({class: classNames?.calendarContent}),
...calendarProps.classNames,
base: slots.calendar({class: clsx(classNames?.base, calendarProps.classNames?.base)}),
content: slots.calendarContent({
class: clsx(classNames?.calendarContent, calendarProps.classNames?.content),
}),
},
};
};
Expand Down

0 comments on commit a4ab020

Please sign in to comment.