I'm in the process of creating a calendar similar to mui's <DateCalendar />
, and I want to customize the header from 'S M T W T F S' to 'Sun Mon...' as well as adjust the position of the arrows.
Before:
https://i.sstatic.net/wJvIY.png
After:
https://i.sstatic.net/USGHB.png
Code :
import * as React from "react";
import { DateCalendar } from "@mui/x-date-pickers/DateCalendar";
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
import dayjs, { Dayjs } from "dayjs";
export default function Calendar(props) {
const [value, setValue] = React.useState(dayjs("2022-04-17"));
return (
<>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DateCalendar
value={value}
onChange={(newValue) => setValue(newValue)}
/>
</LocalizationProvider>
</>
);
}
Is there anyone who can assist me with implementing these changes?