• Resolved nickrita

    (@nickrita)


    Thank you very much for the plugin. It works great under wp 4.7.1, php 7.0.

    There’s just a fault creating an instance in german. When I change from EN to DE, the week is shown from Tuesday to Monday instead of from Monday to Sunday like it is using EN. Can you please change this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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

    Thread Starter nickrita

    (@nickrita)

    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 7 years, 9 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 7 years, 9 months ago by i4nd90.
    • This reply was modified 7 years, 9 months ago by i4nd90.
    Thread Starter nickrita

    (@nickrita)

    It works now with DE, your daysOfTheWeek and no weekOffset.
    Thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘DE ending with M instead of Sunday’ is closed to new replies.