Fix Locale adapter with last version of MUI Date Picker

This commit is contained in:
Emmy D'Anello 2024-11-11 21:44:09 +01:00
parent 2e5b5970a9
commit af61173e9d
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -2,7 +2,7 @@ import {createBrowserRouter, RouterProvider} from "react-router-dom"
import Station from "./Station"
import {createTheme, CssBaseline, ThemeProvider, useMediaQuery} from "@mui/material"
import React, {useMemo} from "react"
import {frFR, LocalizationProvider} from "@mui/x-date-pickers"
import {LocalizationProvider} from "@mui/x-date-pickers"
import {AdapterDayjs} from "@mui/x-date-pickers/AdapterDayjs"
import 'dayjs/locale/fr'
import './App.css'
@ -58,7 +58,7 @@ function App() {
return <>
<ThemeProvider theme={theme}>
<CssBaseline />
<LocalizationProvider dateAdapter={AdapterDayjs} localeText={frFR.components.MuiLocalizationProvider.defaultProps.localeText} adapterLocale="fr">
<LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale="fr">
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} />
</QueryClientProvider>