如何使用完整日历在时间轴日历上删除时间



我已经使用全卡车制作了时间轴7天。但是我只需要日期,而不是时间。我不需要时间。我只想要12/18 12/19 12/20等日期。这是我的代码:

$(function() { // document ready
$('#calendar').fullCalendar({
  now: '2017-12-07',
  editable: false, // enable draggable events
  aspectRatio: 1.9,
  scrollTime: '00:00', // undo default 6am scrollTime
  header: {
    left: 'prev,next',
    center: 'title',
    right: 'timelineThreeDays'
  },
  defaultView: 'timelineThreeDays',
  views: {
    timelineThreeDays: {
      type: 'timeline',
      duration: { days: 7 }
    }
  },
  resourceLabelText: 'Inventory',
  resources: [
    { id: 'a', title: 'Auditorium A' },
    { id: 'b', title: 'Auditorium B', eventColor: 'green' },
    { id: 'c', title: 'Auditorium C', eventColor: 'orange' },
    { id: 'd', title: 'Auditorium D', children: [
      //{ id: 'd1', title: 'Room D1' },
      //{ id: 'd2', title: 'Room D2' }
    ] },
    { id: 'e', title: 'Auditorium E' },
    { id: 'f', title: 'Auditorium F', eventColor: 'red' },
    { id: 'g', title: 'Auditorium G' },
    { id: 'h', title: 'Auditorium H' },
    { id: 'i', title: 'Auditorium I' },
    { id: 'j', title: 'Auditorium J' },
    { id: 'k', title: 'Auditorium K' },
    { id: 'l', title: 'Auditorium L' },
    { id: 'm', title: 'Auditorium M' },
    { id: 'n', title: 'Auditorium N' },
    { id: 'o', title: 'Auditorium O' },
    { id: 'p', title: 'Auditorium P' },
    { id: 'q', title: 'Auditorium Q' },
    { id: 'r', title: 'Auditorium R' },
    { id: 's', title: 'Auditorium S' },
    { id: 't', title: 'Auditorium T' },
    { id: 'u', title: 'Auditorium U' },
    { id: 'v', title: 'Auditorium V' },
    { id: 'w', title: 'Auditorium W' },
    { id: 'x', title: 'Auditorium X' },
    { id: 'y', title: 'Auditorium Y' },
    { id: 'z', title: 'Auditorium Z' }
  ],
  events: [
    //{ id: '1', resourceId: 'b', start: '2017-12-07T02:00:00', end: '2017-12-07T07:00:00', title: 'event 1' },
    //{ id: '2', resourceId: 'c', start: '2017-12-07T05:00:00', end: '2017-12-07T22:00:00', title: 'event 2' },
    { id: '3', resourceId: 'b', start: '2017-12-07', end: '2017-12-12', title: 'Hold' },
    { id: '4', resourceId: 'd', start: '2017-12-07', end: '2017-12-10', title: 'Available' },
    //{ id: '4', resourceId: 'e', start: '2017-12-07T03:00:00', end: '2017-12-07T08:00:00', title: 'event 4' },
    //{ id: '5', resourceId: 'f', start: '2017-12-07T00:30:00', end: '2017-12-07T02:30:00', title: 'event 5' }
  ]
});

});

如果我删除了滚动时间,没有运气。谁能知道如何实现这一目标?

我认为您的意思是您想要时间表上显示的间隔,而不是几个小时或几分钟的较短间隔。

要执行此操作,根据文档,您必须设置" slotduration"选项:

slotDuration: '24:00'

让您显示24小时(1天)的间隔。

请参阅http://jsfiddle.net/toytd26b/3/有关演示。

相关内容

  • 没有找到相关文章