-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Steps to reproduce
Link to live example:
Correct in 7.9.0: https://codesandbox.io/p/sandbox/mui-daterangepicker-format-issue-7-9-0-jg2c5f
Incorrect in 7.10.0: https://codesandbox.io/p/sandbox/mui-datetimerangepicker-format-issue-7-10-0-6hdc22
Incorrect in 7.14.0: https://codesandbox.io/p/sandbox/mui-datetimerangepicker-format-issue-latest-cdnst2
The issue appears when using polish locale:
<LocalizationProvider
dateAdapter={AdapterDayjs}
adapterLocale={dayjs.locale("pl")}
>
<DateTimeRangePicker<Dayjs>
value={[dayjs("2020-02-02T00:00:00"), dayjs("2020-02-03T00:00:00")]}
slots={{ field: SingleInputDateTimeRangeField }}
sx={{ "& .MuiInputBase-root": { width: "250px" } }}
/>
</LocalizationProvider>
Current behavior
On x-date-pickers version >= 7.10.0 the picker displays date in format 02 00:00 – 03 00:00, not showing month and year.
Expected behavior
On x-date-pickers version <= 7.9.0 the picker was working correctly displaying format: 02.02.2020 00:00 – 03.02.2020 00:00
Context
No response
Your environment
Version that works:
"dayjs": "1.11.13",
"@mui/material": "5.16.7",
"@mui/x-date-pickers-pro": "7.9.0"
Version that doesn't work:
"dayjs": "1.11.13",
"@mui/material": "5.16.7",
"@mui/x-date-pickers-pro": "7.10.0"
Search keywords: locale, dayjs
Order ID: Order 80141