javascript - 每个 View 的全日历选项

标签 javascript jquery fullcalendar

我在使用 fullcalendar 插件时遇到了一些问题。 我想为每个多个 View 设置不同的选项。 例如,我想在日 View 中将 slotDuration 和 defaultTimedEventDuration 设置为 30 分钟,但在周 View 中应该为 2 小时。

我怎样才能做到这一点?使用 fullcalendar 插件是否可以实现这一点?提前致谢。

最佳答案

@Ryan89 感谢您的帮助。 slotDuration 现已正常工作,defaultTimedEventDuration 似乎无法按 View 定义。

 views: {
      week: {
        defaultTimedEventDuration: '00:15:00',
        slotDuration: "00:30:00"
      },
      day: {
        defaultTimedEventDuration: '00:15:00',
        slotDuration: "00:15:00"
      },
      agendaDetailed: {
        type: 'agenda',
        buttonText: 'Detailed',
        defaultTimedEventDuration: '00:05:00',
        slotDuration: "00:05:00"
      }
    },

关于javascript - 每个 View 的全日历选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42301726/

相关文章:

javascript - 如何将自己的 JS 添加到 Razor View ?

javascript - 在特定网址上运行谷歌分析

javascript - Javascript fs.readFileSync 返回什么编码?

javascript - 调整窗口大小后触发函数

javascript - 如何在 contenteditable 中的插入符处输入字符?

javascript - Promise.all 比预期更早解决

javascript - FullCalendar v5.x 中 eventAfterAllRender 的替代选项

jquery - 在 FullCalendar 中更改选择颜色

javascript - fullcalendar - 在窗口调整大小时调整日历大小

javascript - 完整日历日单击并解决了时区更改的事件日期问题