-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update @mui/x-date-pickers and Project Schedule settings (#2876)
- Loading branch information
1 parent
11523e3
commit 761f557
Showing
11 changed files
with
230 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { LocalizationProvider } from "@mui/x-date-pickers"; | ||
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"; | ||
// Import for each non-en uiWritingSystem lang in src/types/writingSystem.ts: | ||
import "dayjs/locale/ar"; | ||
import "dayjs/locale/es"; | ||
import "dayjs/locale/fr"; | ||
import "dayjs/locale/pt"; | ||
import "dayjs/locale/zh"; | ||
import { ReactElement, ReactNode } from "react"; | ||
|
||
import i18n from "i18n"; | ||
|
||
export default function DatePickersLocalizationProvider(props: { | ||
children: ReactNode; | ||
}): ReactElement { | ||
return ( | ||
<LocalizationProvider | ||
// If i18n.language changes, user must refresh or log out and back in | ||
// for the change to take effect in @mui/x-date-pickers components. | ||
adapterLocale={i18n.language || undefined} | ||
dateAdapter={AdapterDayjs} | ||
> | ||
{props.children} | ||
</LocalizationProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.