File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,9 +18,12 @@ export type DatepickerProps = {
1818 * @default bottom-start
1919 */
2020 placement ?: 'bottom-start' | 'bottom' | 'bottom-end' ;
21- /** Determines if the clear button appears in the action bar */
21+ /** Determines if the clear button appears in the action bar and input. _No custom onClear available_ */
2222 clearable ?: boolean ;
23- } & Omit <
23+ }
24+ // TODO: v3 BREAKING CHANGE add onClear and remove action bar clear button
25+ // & Pick<ExportedPickerFieldUIProps, 'onClear' | 'clearable'>
26+ & Omit <
2427 MuiDatePickerProps < false > ,
2528 | 'components'
2629 | 'componentsProps'
@@ -83,6 +86,7 @@ export const Datepicker = ({
8386 { ...props }
8487 dayOfWeekFormatter = { ( weekday : Dayjs ) => weekday . format ( 'dd' ) }
8588 slotProps = { {
89+ // TODO: v3 BREAKING CHANGE remove action bar
8690 actionBar : {
8791 actions : clearable ? [ 'clear' ] : [ ] ,
8892 } ,
@@ -92,6 +96,8 @@ export const Datepicker = ({
9296 'aria-label' : FieldProps ?. label ?. toString ( ) || FieldProps ?. inputProps ?. [ 'aria-label' ] || 'Date picker' ,
9397 'aria-labelledby' : FieldProps ?. inputProps ?. [ 'aria-labelledby' ] || undefined ,
9498 } ,
99+ // TODO: v3 add onClear to field
100+ field : { clearable } ,
95101 textField : FieldProps ,
96102 popper : {
97103 placement,
Original file line number Diff line number Diff line change @@ -1858,6 +1858,10 @@ export const lightTheme = {
18581858 // padding: '8px',
18591859 color : tokens . colorGrey400 ,
18601860 } ,
1861+ '.MuiInputAdornment-root .MuiIconButton-root' : {
1862+ width : '2.25rem' ,
1863+ height : '2.25rem' ,
1864+ } ,
18611865 } ,
18621866 } ,
18631867 } ,
You can’t perform that action at this time.
0 commit comments