活动未在正确位置显示

时间:2020-11-04 12:22:12

标签: javascript html reactjs calendar react-big-calendar

版本-“ react-big-calendar”:“ ^ 0.28.2”

enter image description here-

附带的屏幕截图

请在下面找到React代码-

<Calendar
        defaultDate={moment().toDate()}
        defaultView="month"
        events={[{
          "status": "pending",
          start: new Date(2020, 10, 11, 10, 0),
          end: new Date(2020, 10, 11, 17, 0),
          "title": "Michael Scott",
          'allDay': false,
        }]}
        localizer={localizer}
        max={new Date(0, 0, 0, 21, 0, 0)}
        min={new Date(0, 0, 0, 7, 0, 0)}
        resizable
        selectable
        style={{ height: '80vh' }}
          />

1 个答案:

答案 0 :(得分:-1)

您需要按时在Obj“事件”处设置日期格式。示例:

sam build