@@ -73,6 +73,9 @@ interface StyledDatepicker
7373 ZIndexProps ,
7474 BoxShadowProps {
7575 rtl : boolean
76+ height : string
77+ left : string
78+ top : string
7679}
7780const composeStyledDatepickerStyles = compose (
7881 background ,
@@ -85,7 +88,10 @@ const composeStyledDatepickerStyles = compose(
8588)
8689
8790const StyledDatepicker = styled ( 'div' ) < StyledDatepicker > `
88- ${ composeStyledDatepickerStyles }
91+ ${ composeStyledDatepickerStyles } ;
92+ height: ${ ( { height} ) => height || 'unset' } ;
93+ left: ${ ( { left} ) => left || 'unset' } ;
94+ top: ${ ( { top} ) => top || 'unset' } ;
8995 ${ ( { rtl} ) =>
9096 rtl &&
9197 css `
@@ -141,6 +147,12 @@ export interface DatepickerProps extends UseDatepickerProps {
141147 monthLabelFormat ?( date : Date ) : string
142148 onDayRender ?( date : Date ) : React . ReactNode
143149 unavailableDates ?: Date [ ]
150+ datepickerSelectDateGridTemplateColumns ?: string
151+ datepickerWidth ?: string
152+ datepickerBorderRadius ?: string
153+ datepickerHeight ?: string
154+ datepickerLeft ?: string
155+ datepickerTop ?: string
144156}
145157
146158function Datepicker (
@@ -170,6 +182,12 @@ function Datepicker(
170182 displayFormat = 'MM/dd/yyyy' ,
171183 phrases = datepickerPhrases ,
172184 unavailableDates = [ ] ,
185+ datepickerSelectDateGridTemplateColumns = '' ,
186+ datepickerWidth = '' ,
187+ datepickerBorderRadius = '' ,
188+ datepickerHeight = 'unset' ,
189+ datepickerLeft = '0px' ,
190+ datepickerTop = '0px' ,
173191 } : DatepickerProps ,
174192 ref ?: React . Ref < unknown > ,
175193) {
@@ -214,11 +232,11 @@ function Datepicker(
214232 const themeContext = useContext ( ThemeContext )
215233 const theme : DatepickerTheme = useThemeProps ( {
216234 datepickerZIndex : null ,
217- datepickerBackground : '#ffffff' ,
235+ datepickerBackground : '#ffffff !important ' ,
218236 datepickerPadding : vertical ? '16px 16px 0' : '32px' ,
219237 datepickerBorderRadius : '2px' ,
220238 datepickerPosition : 'relative' ,
221- datepickerWidth : 'fit-content' ,
239+ datepickerWidth : datepickerWidth || 'fit-content' ,
222240 datepickerCloseWrapperPosition : vertical ? 'relative' : 'absolute' ,
223241 datepickerCloseWrapperDisplay : vertical ? 'flex' : 'block' ,
224242 datepickerCloseWrapperJustifyContent : vertical ? 'flex-end' : 'initial' ,
@@ -292,12 +310,15 @@ function Datepicker(
292310 < StyledDatepicker
293311 background = { theme . datepickerBackground }
294312 p = { theme . datepickerPadding }
295- borderRadius = { theme . datepickerBorderRadius }
313+ borderRadius = { datepickerBorderRadius || theme . datepickerBorderRadius }
296314 position = { theme . datepickerPosition }
297315 boxShadow = { theme . datepickerBoxShadow }
298316 width = { theme . datepickerWidth }
317+ height = { datepickerHeight }
299318 zIndex = { theme . datepickerZIndex }
300319 rtl = { rtl }
320+ left = { datepickerLeft }
321+ top = { datepickerTop }
301322 >
302323 { showClose && (
303324 < CloseWrapper
@@ -319,7 +340,10 @@ function Datepicker(
319340 < DateWrapper >
320341 < Grid
321342 data-testid = "SelectedDatesGrid"
322- gridTemplateColumns = { theme . datepickerSelectDateGridTemplateColumns }
343+ gridTemplateColumns = {
344+ datepickerSelectDateGridTemplateColumns ||
345+ theme . datepickerSelectDateGridTemplateColumns
346+ }
323347 gridTemplateRows = { theme . datepickerSelectDateGridTemplateRows }
324348 >
325349 < SelectedDate
0 commit comments