diff --git a/.changeset/flat-pants-accept.md b/.changeset/flat-pants-accept.md new file mode 100644 index 0000000000..8c71441e13 --- /dev/null +++ b/.changeset/flat-pants-accept.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/date-picker": patch +--- + +Fixes getCalendarProps to propagate the classNames in the calendarProps. (#3769) diff --git a/packages/components/date-picker/src/use-date-picker.ts b/packages/components/date-picker/src/use-date-picker.ts index 5f7ebd0245..45f48c6127 100644 --- a/packages/components/date-picker/src/use-date-picker.ts +++ b/packages/components/date-picker/src/use-date-picker.ts @@ -204,8 +204,11 @@ export function useDatePicker({ ...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), + }), }, }; };