我们目前使用 Excel 电子表格来显示我们的 5 人管理团队的日程安排。这很容易做到,因为我们只有三个轮类:D = 白类,E 代表晚上,M 代表午夜。单元格注释显示特定类次的任何特定事件。
是时候从 Excel 转移到一个更加动态的环境中了,我想将 FullCalendar 与我的 MongoDB 和一些 Ruby 脚本一起使用。但是,我不是 JS 专家,我想知道是否可以在一个日历上查看所有 5 个时间表?也许每个经理姓名旁边的复选框将在选中时显示他们的日历,或者如果所有经理都选中环境类型。
我没有在文档中看到这种类型的功能,所以下一个最好的地方是向这里的专家询问!
非常感谢!!
最佳答案
首先,您需要 fullcalendar 的调度程序插件,一切顺利。 这是一个例子
var calendar = $('#calendar').fullCalendar({
schedulerLicenseKey: 'your key here',
header: {left: 'prev,next today', center: 'title', right: ''},
selectable: true,
defaultView: 'agendaDay',
ignoreTimezone: true,
allDayDefault: false,
unselectAuto: false,
editable: false,
slotLabelFormat:"HH:mm",
events: [ //the events example
[
id: 1,
type: null,
resourceIds: [
21
],
title:"Meeting With John",
start: 2017-02-13 09:00:00,
end: 2017-02-13 11:20:00,
],
[
id: 2,
type: null,
resourceIds: [
22
],
title: "Appointment With Doctor",
start: 2017-02-13 10: 00: 00,
end: 2017-02-13 13: 20: 00,
],
],
resources: [ // these resources examples are the users you want to create(where its id is mapped to resourceIds in events JSON )
[
id: 21,
title: "User A"
],
[
id: 22,
title: "User B"
]
]
});
<div id="calendar" style="width:100% !important">
</div>
请参阅示例快照。 让我知道结果如何...
关于javascript - 具有多个用户的 FullCalendar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42176674/