我想更新在日历中选择时间后创建的事件。我想事件对象没有传递给对话框。我如何更新新事件并将对话框变量传递给它?
select: function(start, end) {
var $dialogContent = $("#event_edit_container");
var titleField = $dialogContent.find("select[name='start']").val();
var event = {title : 'xxx', start : start, end : end};
calendar.fullCalendar('renderEvent', event, true);
$dialogContent.dialog({
modal: true,
buttons: {
save: function(event) {
event.title = titleField;
calendar.fullCalendar('updateEvent', event);
},}
}).show();
}
包含jsfiddle:http://jsfiddle.net/5JY3N/