我使用 fullcalendar 将 resourceDay View 实现为单日事件。当我拆分资源列时,我得到不同的开始日期和结束日期,但我想将所有资源列的日期设置为相同的日期,我的意思是一个日期具有不同的资源,请帮我解决这个问题。我获取 resourceDay View 的代码如下。
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: ''
},
defaultView: 'resourceDay',
slotMinutes: 10,
selectable: true,
selectHelper: true,
editable: true,
contentHeight: 530,
resources: <?php echo json_encode($return_resource); ?>,
events: <?php echo json_encode($return_arr); ?>,
select: function(start, end, allDay) {
$(' #newSession').show();
$('.calendersize').css({marginLeft : "0px", width: "648px"});
var currentDate = ($.fullCalendar.formatDate(start, 'yyyy-MM-d'));
var agendaDate = ($.fullCalendar.formatDate(start, 'dddd MMM d, yyyy'));
$(' #agendaDate').text(agendaDate);
var startTimeSet=($.fullCalendar.formatDate(start, 'yyyy-MM-d hh:mm tt'));
var endTimeSet=( $.fullCalendar.formatDate(end, 'yyyy-MM-d hh:mm tt'));
......
},
请帮助我如何为所有资源列设置相同的日期。
最佳答案
确保事件对象结构正确并试试这个:
select: function(start, end, allDay, event, resourceId) {
alert(resourceId);
}
关于javascript - 如何使用 fullcalendar 为 resourceDay View 中的所有资源列设置相同的日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22778370/