全日历插槽不在整列中,而是从中间开始

时间:2018-09-05 05:04:51

标签: javascript ruby-on-rails fullcalendar fullcalendar-3 fullcalendar-2

我正在使用15分钟的完整日历周视图。

插槽不是完整的列,每个插槽都从行的中间开始。

在屏幕截图中,上午9点是从行的中间开始,而不是从中间开始。如何实现我找不到文档中的任何内容。

enter image description here

以下是我的日历设置

$(function() {

  $('#calendar').fullCalendar({
    defaultView: 'agendaWeek',
    allDaySlot: false,

    minTime: "00:00:00",
    maxTime: "24:00:00",

    slotDuration: '00:15:00',
    slotLabelInterval: 15,
    slotLabelFormat: 'h(:mm)a',

    groupByResource: true,
    header: {
      left: 'prev,next',
      center: 'title',
      right: 'agendaDay,agendaWeek'
    },
    views: {
      agendaWeek: {
        type: 'agenda',
        duration: { days: 7 }
      }
    },
    resources: [
      { id: 'a', title: 'Room A' }
    ],
    events: [
      {
        title: 'Available',
        start: '2018-09-03T07:30:00',
        end: '2018-09-07T23:00:00',
        color: 'rgba(83,253,173,0.3)'
      },
      { 
        title: 'Booked',
        start: '2018-09-03T09:30:00',
        end: '2018-09-03T10:00:00',
        color: 'rgba(253,83,83,0.3)',
        description: 'This is a cool event'
      },
      { 
        title: 'Buffer Time',
        start: '2018-09-04T09:30:00',
        end: '2018-09-04T10:00:00',
        color: 'rgba(74,74,74,0.5)',
        description: 'This is a cool event'
      },
      { 
        title: 'Rest Time',
        start: '2018-09-05T09:30:00',
        end: '2018-09-05T10:00:00',
        color: 'rgba(240,212,80,0.5)',
        description: 'This is a cool event'
      }
    ]

});

0 个答案:

没有答案