如何使用全日历为资源日视图中的所有资源列设置相同的日期

how to set same date for all the resources column in resourceDay view using fullcalendar

本文关键字:资源 设置 日期 何使用 日历 视图      更新时间:2023-09-26

我使用完整日历为事件实现资源日视图到单日。 当我拆分资源列时,我得到不同的开始日期和结束日期,但我想将所有资源列的日期相同,我的意思是具有不同资源的日期,请帮助我如何解决此问题。 我获取资源日视图的代码如下。

 $('#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);
}