【发布时间】:2019-09-23 19:00:29
【问题描述】:
我正在为投影仪创建预订,在开发过程中,我被困在这里,每次拖动新事件时,它都不会在日历视图中创建新事件。我尝试提醒值并正确检索它,只有日历没有更新。 Fullcalendar + Scheduler 在互联网上的资源有限,所以我尝试在这里询问。有人知道缺少什么或应该做什么吗?
select: function(info)
{
this.title = prompt('Event Title:');
if (this.title) {
this.eventData = {
title: this.title,
start: info.start,
end: info.end,
resourceId: info.resource.id // Example of resource ID
};
$('#calendar').fullCalendar('renderEvent', this.eventData, true); // stick? = true
}
$('#calendar').fullCalendar('unselect');
alert('selected ' + info.start + ' to ' + info.endStr + 'wew ' + info.resource.id);
},
【问题讨论】:
-
您使用的是哪个版本的 fullCalendar?你的一些语法是按照 v4 的,有些是按照 V3 的......但它们非常不同,你不能将两者混合使用。你检查过你的控制台有没有错误?
-
版本 4.1 先生。到目前为止,没有控制台错误,只是它没有更新日历视图中的事件
-
谢谢先生,我容易忘记 V3 和 V4 的语法是不同的,只是迁移到纯 v4 代码并添加 .addEvent 方法,现在问题已解决。谢谢
标签: fullcalendar fullcalendar-scheduler fullcalendar-4