Replies: 1 comment
-
Resolved. import { FC } from 'react';
import ReactDatePicker from 'react-datepicker';
import type { ReactDatePickerProps } from 'react-datepicker';
import { useTheme } from '@mui/material';
import GlobalStyles from '@mui/material/GlobalStyles';
import 'react-datepicker/dist/react-datepicker.css';
interface DatepickerProps extends ReactDatePickerProps {}
export const Datepicker: FC<DatepickerProps> = (props) => {
const theme = useTheme();
return (
<>
<GlobalStyles
styles={{
'.react-datepicker': {
},
'& .react-datepicker__current-month': {
backgroundColor: theme.palette.primary.main,
},
}}
/>
<ReactDatePicker {...props} />
</>
);
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use it like this, but not work, How do I customize a style using mui5 styled ?
Beta Was this translation helpful? Give feedback.
All reactions