iamkun / iamkun/dayjs

Localization in combination with MuiPickersUtilsProvider seems to be broken

Open
#670 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Using a [material-ui date picker](https://material-ui-pickers.dev/getting-started/installation), the localization is not working.

Live example using **dayjs** where the problem is also reproduced: https://codesandbox.io/s/clever-field-2gzmf
Live example using **moment** which _does_ work: https://codesandbox.io/s/young-snow-ejinu

**Expected behavior**
The textfield should show the month in dutch, i.e.: `augustus 28ste`
When you click on the date icon, the modal window where you can select a date should show the translated month name.

Expected the implementation of the language to be similar as other libraries. Moment works by simply including:

```javascript
// ...
import MomentUtils from "@date-io/moment";
import "moment/locale/nl";
```

And then using it like:

```javascript

```

**Information**
- Day.js Version 1.8.16
- OS: OSX
- Browser Chrome
- Time zone: GMT+2 (CEST)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.