【问题标题】:Full Calendar - MinMax Time+SlotDuration Not Show Hours Column完整日历 - MinMax Time+SlotDuration 不显示小时列
【发布时间】:2016-12-13 04:33:34
【问题描述】:

我正在使用 fullcalendar v2.9.1,我想显示 slotDuration 为 '00:90:00' 和 maxTime: "22:00:00", minTime: "08:00:00" 的日历。

但是日历没有在左栏中显示小时数。

当我删除最小/最大时间时,我注意到没有上午 8 点,只有 6:30 和 9:00(因为 slotDuration 为 90 分钟)。

设置如下:

views: {
    agendaOneDay: {
      type: 'agenda',
      duration: { days: 1 },
      // buttonText: '2 day',
      weekends: false,
      columnFormat: 'ddd M/D'
    }
  },
  timezone: "local",
  header: false,
  height: calendarService.getCalendarHeightViaScreenSize(contact),
  slotDuration: '00:90:00',
  slotEventOverlap: false,
  // slotLabelInterval: '02:00:00',
  defaultView: device_type_mobile ? 'agendaOneDay' : 'agendaWeek',
  eventBackgroundColor: 'white',
  eventTextColor: '#3f51b5',
  firstDay: 1,
  weekends: false,
  selectable: true,
  eventOverlap: false,
  selectOverlap: contact ? true : false,
  editable: contact ? false : true,
  maxTime: "22:30:00",
  minTime: "08:00:00",
  axisFormat: 'HH:mm',
  allDaySlot: false

有人可以在这方面帮助我吗?

更新: 我尝试使用 moment.js:

slotDuration: moment.duration('00:90:00'),

即使这样,它也不起作用。

谢谢!

【问题讨论】:

    标签: javascript calendar fullcalendar momentjs


    【解决方案1】:

    什么时候都不晚……

    在“最大时间:”|类型“字符串”是不可分配的

    你需要写:

    minTime: duration("hh:mm:ss"),
    maxTime: duration("hh:mm:ss"),
    

    【讨论】:

      猜你喜欢
      • 2011-04-23
      • 1970-01-01
      • 1970-01-01
      • 2020-06-05
      • 1970-01-01
      • 2018-03-02
      • 1970-01-01
      • 2016-12-15
      • 1970-01-01
      相关资源
      最近更新 更多