A
A
Andrey Kharitonov2019-10-01 08:42:51
Angular
Andrey Kharitonov, 2019-10-01 08:42:51

How to set weekday to start from Monday in angular-calendar?

there is a calendar https://mattlewis92.github.io/angular-calendar/#/k...
where the day starts from sunday. How can I make it start on Monday?
sort of like the parameter weekStartsOn = DAYS_OF_WEEK.SUNDAY; change to weekStartsOn = DAYS_OF_WEEK.MONDAY;... but how to fix it and where to insert it to make it work is not clear.
Maybe someone came across. I would be grateful for clarifications.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Kharitonov, 2019-10-01
@AskiLD

Understood.
in component.ts

import { DAYS_OF_WEEK } from 'angular-calendar';

weekStartsOn = DAYS_OF_WEEK.MONDAY;

in component.html
<mwl-calendar-month-view
      [viewDate]="viewDate"
      [events]="events"
      [activeDayIsOpen]="activeDayIsOpen"
      (dayClicked)="dayClicked($event.day)"
      [locale]="locale"
     [weekStartsOn] = "weekStartsOn" //вот тут
    >
</mwl-calendar-month-view>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question