【问题标题】:how to make a dismissible event in fullcalendar?如何在fullcalendar中制作可忽略的事件?
【发布时间】:2018-12-20 14:47:47
【问题描述】:

是否有可能在 fullcalendar 中具有与用于删除事件的引导可关闭警报相同的行为?

我希望在以下示例中具有与 Bootstrap 警报相同的行为: https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_alerts_fade&stacked=h

【问题讨论】:

  • 如果您编辑事件的 HTML(通过 eventRender 回调),那么您可以添加任何您喜欢的内容,包括按钮。

标签: events fullcalendar dismissible


【解决方案1】:
element.find('div.fc-title').append("<span id='eventTimes'><i class='fas fa-times'/></span>");
                    element.find("#eventTimes").click(function () {
                        deleteBookingById(event._id);
                        $('.tooltip').remove();
                    });

函数 deleteBookingById(id) {

            if (confirm('Do you want to remove this booking?')) {
                // ToDo: C# delete part
                $('#calendar').fullCalendar('removeEvents', id);
                setNormalBehavior();
            }

    }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-24
    • 1970-01-01
    相关资源
    最近更新 更多