如何在 dx-calendar 中修复 "showing the days of week incorrectly"?

How to fix "showing the days of week incorrectly" in dx-calendar?

我在使用来自 devExtremedx-calendar 组件时遇到问题。 我试图将一周的第一天设置为 1 以将星期一设置为一周的第一天。 组件的日期工作正常。但问题出在标题中。 我正在使用 Angular 7 和 devExtreme 18。

在此处引用此图片:(https://drive.google.com/open?id=11g3igXM1lNfC03xsGeAN173uDlkXgBNH)

  <dx-calendar
    firstDayOfWeek="1"
    (onInitialized)="onInitialized()"
    (onValueChanged)="onValueChanged($event)"
    cellTemplate="custom"
  >
    <span
      *dxTemplate="let cell of 'custom'"
      [ngClass]="getCellCssClass(cell.date)">
      {{ cell.text }}
    </span>
  </dx-calendar>
...
  onInitialized() {
    const today = new Date();
    setTimeout(() => {
      $('.dx-calendar-caption-button span.dx-button-text').html(this.getFormatedDateString(today));
    }, 100);
  }
...
  getCellCssClass(date: string) {
    let cssClass = 'date ';
    const today = new Date();
    const d = new Date(date);
    const matchCase = this.specialDates.find((item) => {
      return item.date.toUTCString().substr(0, 16) === d.toUTCString().substr(0, 16);
    });
    if (matchCase === undefined) {
      if (today.toUTCString().substr(0, 16) === d.toUTCString().substr(0, 16)) {
        cssClass += 'today';
      }
    } else {
      cssClass += 'type' + matchCase.type;
    }
    return cssClass;
  }
...

我只是尝试使用 dx-calendar,您的代码缺少选项 "firstDayOfWeek" 的 []。

<dx-calendar [firstDayOfWeek]="1"></dx-calendar>