【发布时间】:2011-10-31 15:46:56
【问题描述】:
有了 Fullcalendar 插件,有没有办法取消已完成的任务(至少使用<strike> 标签)。我正在从我的数据库中取出任务并将结果传递给json_encode()。
【问题讨论】:
标签: jquery fullcalendar
有了 Fullcalendar 插件,有没有办法取消已完成的任务(至少使用<strike> 标签)。我正在从我的数据库中取出任务并将结果传递给json_encode()。
【问题讨论】:
标签: jquery fullcalendar
如果您使用的是 v5,请将其添加到构造函数中:
eventClassNames: function(arg)
{
//standard event properties are under the "event" object
//and any other property/value you've added to the event
//object will be available under "event.extendedProps",
//just like this 'isUrgent' in the sample bellow:
if (arg.event.extendedProps.isUrgent)
{
return [ 'urgent' ]
}
else
{
return [ 'normal' ]
}
}
<style type="text/css">
.normal
{
text-decoration: none;
}
.urgent
{
text-decoration: line-through;
}
</style>
【讨论】:
你可以创建一个类:
<style>
.strike-class{
text-decoration: line-through;
}
</style>
然后在元素中将类添加到事件中:
eventRender: function(event, element){
if (completed) {
element.addClass("strike-class");
element.children().addClass("strike-class");
}
}
【讨论】: