dayjs localization
See original GitHub issueIs your feature request related to a problem? Please describe.
material-ui-pickers
documentation mentions date-fns & moment, but nothing about dayjs.
Is it supported, and how to use it?
Configuring dayjs
locale globaly before initialization partially works, but formats and weekStart
(Sunday or Monday are still default one: english).
dayjs.extend(utc, {});
dayjs.locale('fr'); // default locale
<MuiPickersUtilsProvider utils={DayjsUtils} locale="fr">
Describe the solution you’d like
Official support & documentation for dayjs localization would be a must!
Additional context
Not sure if it is related but last date-io
version mention support for dayjs localization:
https://github.com/dmtrKovalenko/date-io/pull/39
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:14 (4 by maintainers)
Top Results From Across the Web
LocalizedFormat
LocalizedFormat extends `dayjs().format` API to supply localized format options.
Read more >How to get the locale format? #680 - iamkun/dayjs - GitHub
var dayjs = require("dayjs") var LocalizedFormat = require( 'dayjs/plugin/localizedFormat') var localeData = require( ...
Read more >The Complete Guide to Day.js - Mirza Leka - Medium
To run Day.js, simply type dayjs() and this will generate you a ... are a few localized format tokens that can be used...
Read more >dayjs localizedFormat not showing special characters
Now I want to migrate from moment to dayjs so I created a new function that should create me localized date strings like...
Read more >dayjs-example - CodeSandbox
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In case someone is finding this issue because of the missing documentation:
just import the local from dayjs and set the local globally on dayjs:
dayjs docs
I’d like an update on this as well. Setting the local shifts the numbers for the days correctly, but the labels keep starting with Sunday instead of Monday.