事件 Jquery 周日历的多用户错误
Multi users bug with events Jquery Week Calendar
我正在使用 Jquery Week Calendar 插件,几乎一切正常,但是这个:当我将我的用户名数组提供给 "users" 选项时,它会加载所有用户我的阵列但不显示任何事件。显然,当我禁用 "users" 选项时,所有事件都会被加载。
我的用户名数组似乎与事件有冲突。
可能发生了什么??
我们来看看代码:
创建事件:
var eventData1 = {
options: {
timeslotsPerHour: 4,
timeslotHeight: 20,
showAsSeparateUsers: true
},
events : [
{'id':1, 'start': new Date(year22, month22, day22, 12), 'end': new Date(year22, month22, day22, 13, 30),'title':'Lunch with Mike'},
{'id':2, 'start': new Date(year22, month22, day22, 14), 'end': new Date(year22, month22, day22, 14, 45),'title':'Dev Meeting'},
{'id':3, 'start': new Date(year22, month22, day22 + 1, 18), 'end': new Date(year22, month22, day22 + 1, 18, 45),'title':'Hair cut'},
{'id':4, 'start': new Date(year22, month22, day22 - 1, 8), 'end': new Date(year22, month22, day22 - 1, 9, 30),'title':'Team breakfast'},
{'id':5, 'start': new Date(year22, month22, day22 + 1, 14), 'end': new Date(year22, month22, day22 + 1, 15),'title':'Product showcase'}
]
};
正在日历中加载事件:
data: function(start, end, callback) {
console.log(eventData1);
callback(eventData1);
}
其他选项:
users: usersWs, // user names array
showAsSeparateUsers: true,
displayOddEven: true,
displayFreeBusys: false,
displayEvents: true,
allowCalEventOverlap: true,
businessHours : {start: 7, end: 23, limitDisplay: true},
firstDayOfWeek : 1,
daysToShow: 6,
我可以提供更多详细信息。
谢谢大家的关注
您应该通过向每个事件添加 userId: [id]
来将 events
分配给 users
,例如:
events : [
{'id':1, 'start': ..., 'end': ...,'title':'Lunch with Mike', userId: [id]},
{'id':2, 'start': ..., 'end': ...,'title':'Dev Meeting', userId: , userId: [id]},
...
]
那应该可以看看 official demo for multi-user。
我正在使用 Jquery Week Calendar 插件,几乎一切正常,但是这个:当我将我的用户名数组提供给 "users" 选项时,它会加载所有用户我的阵列但不显示任何事件。显然,当我禁用 "users" 选项时,所有事件都会被加载。
我的用户名数组似乎与事件有冲突。
可能发生了什么??
我们来看看代码:
创建事件:
var eventData1 = {
options: {
timeslotsPerHour: 4,
timeslotHeight: 20,
showAsSeparateUsers: true
},
events : [
{'id':1, 'start': new Date(year22, month22, day22, 12), 'end': new Date(year22, month22, day22, 13, 30),'title':'Lunch with Mike'},
{'id':2, 'start': new Date(year22, month22, day22, 14), 'end': new Date(year22, month22, day22, 14, 45),'title':'Dev Meeting'},
{'id':3, 'start': new Date(year22, month22, day22 + 1, 18), 'end': new Date(year22, month22, day22 + 1, 18, 45),'title':'Hair cut'},
{'id':4, 'start': new Date(year22, month22, day22 - 1, 8), 'end': new Date(year22, month22, day22 - 1, 9, 30),'title':'Team breakfast'},
{'id':5, 'start': new Date(year22, month22, day22 + 1, 14), 'end': new Date(year22, month22, day22 + 1, 15),'title':'Product showcase'}
]
};
正在日历中加载事件:
data: function(start, end, callback) {
console.log(eventData1);
callback(eventData1);
}
其他选项:
users: usersWs, // user names array
showAsSeparateUsers: true,
displayOddEven: true,
displayFreeBusys: false,
displayEvents: true,
allowCalEventOverlap: true,
businessHours : {start: 7, end: 23, limitDisplay: true},
firstDayOfWeek : 1,
daysToShow: 6,
我可以提供更多详细信息。 谢谢大家的关注
您应该通过向每个事件添加 userId: [id]
来将 events
分配给 users
,例如:
events : [
{'id':1, 'start': ..., 'end': ...,'title':'Lunch with Mike', userId: [id]},
{'id':2, 'start': ..., 'end': ...,'title':'Dev Meeting', userId: , userId: [id]},
...
]
那应该可以看看 official demo for multi-user。