0
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
defaultView:'agendaDay',
unselectAuto: false,
selectable: true,
selectHelper: false,
editable: true,
droppable: true, // this allows things to be dropped onto the calendar
drop: function() { },
eventRender: function(event, element) {
element.find(".fc-content").append("<span class='close' data-id='" + event._id +"'>x</span>");
},
eventResize:function(event, jsEvent, ui, view) {
console.log("event",event);
alert("StartTime : "+new Date(event.start));
eve = "Channel name : "+ event.title;
s = "StartTime : "+new Date(event.start);
ee = " End "+new Date(event.end);
alert(eve+"\n"+s+"\n"+ee);
<!--alert("Event : "+ event.title+" StartTime : "+new Date(event.start)+" End "+new Date(event.end));-->
},
});
});
// remove event on click in calender
$(document).on('click', '.close', function(){
debugger;
var id = $(this).data('id');
$('#calendar').fullCalendar('removeEvents', id);
$(this).parent().remove();
});
$("#btnReset").click(function() {
$('#calendar').fullCalendar('removeEvents');
});
我想下探到事件壓延 以及如何獲得完整的壓延機事件的詳細信息(即)事件名稱和啓動每個事件的&結束時間在一個警告對話框後,顯示結束時間?如何自動在日曆中刪除事件後結束時間?
Complete source code in fiddle