Start week from Monday instead of Sunday? (localizer not working)
See original GitHub issueI’m not sure but this seems that it’s not working anymore and there is a bit of inconsistency from docs and github repo.
In the docs http://intljusticemission.github.io/react-big-calendar/examples/index.html#intro
import BigCalendar from 'react-big-calendar';
import moment from 'moment';
// Setup the localizer by providing the moment (or globalize) Object
// to the correct localizer.
BigCalendar.momentLocalizer(moment); // or globalizeLocalizer
I tried this also with moment.locale('en-GB')
before passing the object.
Then I checked the master repo and seems different:
BigCalendar.setLocalizer(
BigCalendar.momentLocalizer(moment)
);
Both of them are not working for me anyway, the week is always starting on Sunday when it’s supposed to start on Monday.
Which one is supposed to be correct?
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (4 by maintainers)
Top Results From Across the Web
react big calendar start week from monday instead of sunday?
momentLocalizer (moment);. So the full extract looks something like: import moment from 'moment'; import ...
Read more >change start week day as Monday instead of Sunday ...
Current change calendar view starts from Sunday and end with Saturday. It need to be changed to start week day as Monday instead...
Read more >Localization for .NET; Chapter 3: Week Numbers
The ISO week always starts on Monday. The first week of the year is either calculated by finding the first of January or...
Read more >#145146 Localization: switch week/month start day, define ...
I would like to switch week start day from sunday to monday. Dropdown calendars display weeks starting with Sundays and that is pretty...
Read more >About Big Calendar - Page ⋅ Storybook
Date internationalization and localization is hard and Big Calendar doesn't even attempt to solve that problem. Instead you can use one of the...
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
Found the issue, for some reason using webpack it’s not importing the locales so it always default to
en
which isen-us
noten-gb
This is the fix:
for me only the following worked: