Does anyone know how I can add multiple class names in to one event?
Currently my event object looks something like this.
var eventObject = {
title: displayText,
start: item.startDate,
end : item.endDate,
allDay:true,
color: '#BABBBF',
editable : false,
className : "user_block"
}
When I tried something like this
var eventObject = {
title: displayText,
start: item.startDate,
end : item.endDate,
allDay:true,
color: '#BABBBF',
editable : false,
className : "user_block bday_block"
};
The following code doesn't seem to excute with normal behaviour where it is suppose to remove all events with the "user_block" class
$("#calendar").fullCalendar('removeEvents', function(event) {
return event.className == "user_block";
});
Any ideas on how to solve this? Thank you.
Does anyone know how I can add multiple class names in to one event?
Currently my event object looks something like this.
var eventObject = {
title: displayText,
start: item.startDate,
end : item.endDate,
allDay:true,
color: '#BABBBF',
editable : false,
className : "user_block"
}
When I tried something like this
var eventObject = {
title: displayText,
start: item.startDate,
end : item.endDate,
allDay:true,
color: '#BABBBF',
editable : false,
className : "user_block bday_block"
};
The following code doesn't seem to excute with normal behaviour where it is suppose to remove all events with the "user_block" class
$("#calendar").fullCalendar('removeEvents', function(event) {
return event.className == "user_block";
});
Any ideas on how to solve this? Thank you.
Share Improve this question asked Jul 3, 2014 at 22:07 BaconJuiceBaconJuice 3,77915 gold badges59 silver badges90 bronze badges1 Answer
Reset to default 3From the documentation:
ClassName: String/Array. Optional. A CSS class (or array of classes) that will be attached to this event's element.
Therefore you should use an array of strings to attach multiple classes to the event.
This should solve your problem:
var eventObject = {
title: displayText,
start: item.startDate,
end : item.endDate,
allDay: true,
color: '#BABBBF',
editable : false,
className : ["user_block", "bday_block"]
}
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744904314a4600162.html
评论列表(0条)