【问题标题】:syncfusion scheduler only starts to show events only after one month of the StartTimesyncfusion 调度程序仅在 StartTime 一个月后才开始显示事件
【发布时间】:2021-09-10 00:22:25
【问题描述】:

尝试使用 sycfusion vue 调度程序,但在查看文档示例时 link

这是文档中示例中的事件数据,其中 StartTimeJanuary 15th 2008

let data = [{
Id: 1,
Subject: 'Paris',
StartTime: new Date(2018, 1, 15, 10, 0),
EndTime: new Date(2018, 1, 15, 12, 30),
IsAllDay: false,
RecurrenceRule: 'FREQ=DAILY;INTERVAL=1;COUNT=5'
}];

但在预览中,事件会在一个月后从StartTime 开始在February 15th 上显示,而不是january。这是一个错误还是我错过了什么?

【问题讨论】:

    标签: syncfusion ej2-syncfusion


    【解决方案1】:

    这不是错误 - Date 对象中的月份是 0 索引的,因此它可以正常工作。

    new Date(2018, 1, 15, 10, 0) // Thu Feb 15 2018 10:00:00
    new Date(2018, 0, 15, 10, 0) // Mon Jan 15 2018 10:00:00
    

    更多关于日期对象here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多