时间线——数据列表不出现在日历上

Timeline - data list does not appear on the calendar

我打算开发一个从数据源加载所有数据/事件的时间线。 我正在使用 dev extreme 组件来开发时间线,但是事件没有出现在日历上。我可能做错了什么?

有人可以帮助我吗?

谢谢

Library

DEMO

html

<dx-scheduler
    timeZone="America/Los_Angeles"
    [dataSource]="myDatasource"
    [views]='["timelineDay", "timelineWeek", "timelineWorkWeek", "timelineMonth"]'
    currentView="timelineMonth"
    [firstDayOfWeek]="0"
    [startDayHour]="8"
    [endDayHour]="20"
    [cellDuration]="60"
    [groups]="['idUser']"
    [currentDate]="currentDate"
    [height]="580">
    <dxi-resource
        fieldExpr="idUser"
        [allowMultiple]="true"
        [dataSource]="myDatasource"
        label="Owner"
        [useColorAsDefault]="true"
    ></dxi-resource>
</dx-scheduler>

您的服务发生变化

  date:"2021-02-03T16:00:00.000Z",
  deadline:"2021-02-04T16:00:00.000Z"

  startDate:"2021-02-03T16:00:00.000Z",
  endDate:"2021-02-04T16:00:00.000Z"

喜欢

import { Component, VERSION } from "@angular/core";

@Component({
  selector: "my-app",
  templateUrl: "./app.component.html",
  styleUrls: ["./app.component.css"]
})
export class AppComponent {
  currentDate: Date = new Date();
  myDatasource = [
    {
      id: 1,
      idUser: 1,
      name: "name1",
      startDate: new Date("2021-02-01T16:00:00.000Z"),
      endDate: new Date("2021-02-04T16:00:00.000Z"),
      priority: 1,
      color: "#cb6bb2"
    },
  ...
  ];
}

DEMO