Plugin Author
i4nd90
(@i4nd90)
Hello
You can use weekOffset
in the CLNDR JS Object Options to change which day of the week the calendar starts on. This is relative to the default setting of the locale, as defined by Moment.js
Thank you very much for your answer.
Using DE the week0ffset is 1, like it should be, but the output begins with Tuesday.
I tried having EN and set daysOfTheWeek: [‘Mo’, ‘Di’, ‘Mi’, ‘Do’, ‘Fr’, ‘Sa’, ‘So’], but then the calender is completely not shown anymore.
I added it under weekOffset: 1.
Do I have to use comma or semicolon anywhere?
I edited the mini-calender.
-
This reply was modified 6 years, 3 months ago by
nickrita.
Plugin Author
i4nd90
(@i4nd90)
Yes, you do need a comma between them:
In both DE and EN-GB locale the below *should* result in the calendar starting on ‘Mo’, according to my test environment.
daysOfTheWeek: ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'],
weekOffset: 1
I am not sure why changing the locale has the effect it appears to be having with you. Either way, the above sould fix your specific error and I’ll look into the potential bug when I can.
Edit:
Sorry what I said above was wrong, getting myself confused here! Note the default locale is just “EN” – which is actually “EN-US”, where the week starts on Sunday as opposed to Monday. The above would actually begin on Dienstag/Tuesday for both “DE” and “EN-GB”. Basically, all you need to do is get rid of weekOffset
altogether, as the default formatting for your locale (“DE”) is how you would want already. I’m going to clear this up a future release.
-
This reply was modified 6 years, 3 months ago by
i4nd90.
-
This reply was modified 6 years, 3 months ago by
i4nd90.
It works now with DE, your daysOfTheWeek and no weekOffset.
Thank you very much!