File tree Expand file tree Collapse file tree
packages/features/bookings/Booker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -408,6 +408,7 @@ const BookerComponent = ({
408408 ! ( layout === "mobile" && bookerState === "booking" ) && (
409409 < div className = "mt-auto px-5 py-3" >
410410 < DatePicker
411+ classNames = { customClassNames ?. datePickerCustomClassNames }
411412 event = { event }
412413 slots = { schedule ?. data ?. slots }
413414 isLoading = { schedule . isPending }
@@ -435,14 +436,7 @@ const BookerComponent = ({
435436 initial = "visible"
436437 className = "md:border-subtle ml-[-1px] h-full flex-shrink px-5 py-3 md:border-l lg:w-[var(--booker-main-width)]" >
437438 < DatePicker
438- classNames = { {
439- datePickerContainer : customClassNames ?. datePickerCustomClassNames ?. datePickerContainer ,
440- datePickerTitle : customClassNames ?. datePickerCustomClassNames ?. datePickerTitle ,
441- datePickerDays : customClassNames ?. datePickerCustomClassNames ?. datePickerDays ,
442- datePickerDate : customClassNames ?. datePickerCustomClassNames ?. datePickerDate ,
443- datePickerDatesActive : customClassNames ?. datePickerCustomClassNames ?. datePickerDatesActive ,
444- datePickerToggle : customClassNames ?. datePickerCustomClassNames ?. datePickerToggle ,
445- } }
439+ classNames = { customClassNames ?. datePickerCustomClassNames }
446440 event = { event }
447441 slots = { schedule ?. data ?. slots }
448442 isLoading = { schedule . isPending }
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { shallow } from "zustand/shallow";
22
33import type { Dayjs } from "@calcom/dayjs" ;
44import dayjs from "@calcom/dayjs" ;
5+ import type { DatePickerClassNames } from "@calcom/features/bookings/Booker/types" ;
56import { DatePicker as DatePickerComponent } from "@calcom/features/calendars/DatePicker" ;
67import { useNonEmptyScheduleDays } from "@calcom/features/schedules/lib/use-schedule/useNonEmptyScheduleDays" ;
78import { weekdayToWeekIndex } from "@calcom/lib/dayjs" ;
@@ -69,14 +70,7 @@ export const DatePicker = ({
6970 } ;
7071 slots ?: Slots ;
7172 isLoading ?: boolean ;
72- classNames ?: {
73- datePickerContainer ?: string ;
74- datePickerTitle ?: string ;
75- datePickerDays ?: string ;
76- datePickerDate ?: string ;
77- datePickerDatesActive ?: string ;
78- datePickerToggle ?: string ;
79- } ;
73+ classNames ?: DatePickerClassNames ;
8074 scrollToTimeSlots ?: ( ) => void ;
8175} ) => {
8276 const { i18n } = useLocale ( ) ;
Original file line number Diff line number Diff line change @@ -161,14 +161,7 @@ export type CustomClassNames = {
161161 eventMetaTimezoneSelect ?: string ;
162162 eventMetaChildren ?: string ;
163163 } ;
164- datePickerCustomClassNames ?: {
165- datePickerContainer ?: string ;
166- datePickerTitle ?: string ;
167- datePickerDays ?: string ;
168- datePickerDate ?: string ;
169- datePickerDatesActive ?: string ;
170- datePickerToggle ?: string ;
171- } ;
164+ datePickerCustomClassNames ?: DatePickerClassNames ;
172165 availableTimeSlotsCustomClassNames ?: {
173166 availableTimeSlotsContainer ?: string ;
174167 availableTimeSlotsHeaderContainer ?: string ;
@@ -182,3 +175,12 @@ export type CustomClassNames = {
182175 backButton ?: string ;
183176 } ;
184177} ;
178+
179+ export type DatePickerClassNames = {
180+ datePickerContainer ?: string ;
181+ datePickerTitle ?: string ;
182+ datePickerDays ?: string ;
183+ datePickerDate ?: string ;
184+ datePickerDatesActive ?: string ;
185+ datePickerToggle ?: string ;
186+ } ;
You can’t perform that action at this time.
0 commit comments