【问题标题】:Fullcalendar V4 or V5, How to remove the slot label row in resourceTimeline typeFullcalendar V4 或 V5,如何删除 resourceTimeline 类型中的插槽标签行
【发布时间】:2020-05-05 15:35:19
【问题描述】:

我正在将 fullcalendar-scheduler 1.9.4 升级到 v5 beta2。 我发现slotLabelInterval的行为已经从v3改成了v4。

我的目标:我想完全删除插槽标签行。我在 V1.9.4 中的设置如下(有效):

...    
weekNumbers: true,
views: {
            timelineThreeDays: {
              type: 'timeline',
              duration: { days: 3 },
              slotLabelInterval: '24:00:00'
            }
          },
...

但是设置 "slotLabelInterval: '24:00:00'" 在使用 Fullcalendar-Scheduler 5 beta2(与 v4 相同)的 resourceTimeline 类型中不会做同样的事情

...    
weekNumbers: true,
views: {
            timelineThreeDays: {
              type: 'resourceTimeline',
              duration: { days: 3 },
              slotLabelInterval: '24:00:00'
            }
          },
...

以上代码截图:

我尝试过的:

  • 将 slotDuration 同时设置为 24,而不是 slotLabelInterval(它不起作用)
  • set slotLabelFormat: { weekday: 'short', month: 'short' } (没用,总是显示时隙标签)

问题:如何用 V5 制作和第一张截图一样的效果

【问题讨论】:

    标签: javascript fullcalendar fullcalendar-4 fullcalendar-5


    【解决方案1】:

    在 v4(或 v5 测试版)中,您可以像这样设置相同的时间段:

    slotLabelInterval: { days: 1 },
    

    演示:https://codepen.io/ADyson82/pen/abvqBrN

    【讨论】:

      猜你喜欢
      • 2017-06-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多