jquery - Fullcalendar-如何划掉并显示已完成的任务

标签 jquery fullcalendar

使用 Fullcalendar 插件,有没有办法删除已完成的任务(至少使用 <strike> 标签)。我正在从数据库中取出任务,并将结果传递到 json_encode() .

最佳答案

如果您使用的是 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>

关于jquery - Fullcalendar-如何划掉并显示已完成的任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7139531/

相关文章:

javascript - JS函数在onclick事件中不可见

jquery - 如何从 checkin 和 checkout <li> 中获取值(value)?

javascript - ExternalInterface addCallback 多次失败

javascript - 突出显示导航栏的图像和文本

Javascript fullcalendar prod 服务器与开发机器问题

Javascript比较两个日期时间

fullcalendar - 在 FullCalendar 中突出显示所选日期

fullcalendar - 当 CustomView 具有可见范围时,使用上一个/下一个在 FullCalendar 中导航

javascript - fullcalendar 在 IE 中不渲染事件(所有版本)

javascript - fullcalendar- 无法获取点击事件的日期