版本的Fullcalendar和Scheduler问题

版本的Fullcalendar和Scheduler问题,fullcalendar,fullcalendar-scheduler,Fullcalendar,Fullcalendar Scheduler,我对FullCalendar(FC)和它的插件调度程序有问题 几个月以来,我将1.2.0版与2.6.0版(FC)一起使用 没关系,但是使用“动态获取/设置选项”功能可以极大地满足用户的新请求(启用/禁用资源分组)。所以我下载了新版本的库,1.4.0和3.0.1(FC) 问题来了:对于正常的日程安排日视图,它工作得很好。但是,当我打开一个新页面,在那里我使用每周视图,没有显示任何数据 我什么都试过了: 使用2.7.3(FC)和1.3.2(S)更改了版本。 使用了压缩包中的(FC)版本和(S)。

我对FullCalendar(FC)和它的插件调度程序有问题

几个月以来,我将1.2.0版与2.6.0版(FC)一起使用

没关系,但是使用“动态获取/设置选项”功能可以极大地满足用户的新请求(启用/禁用资源分组)。所以我下载了新版本的库,1.4.0和3.0.1(FC)

问题来了:对于正常的日程安排日视图,它工作得很好。但是,当我打开一个新页面,在那里我使用每周视图,没有显示任何数据

我什么都试过了:

  • 使用2.7.3(FC)和1.3.2(S)更改了版本。
  • 使用了压缩包中的(FC)版本和(S)。
  • 在做了一些修改之后,我删除了它们,但问题似乎在于这些库一起运行的方式。
我会发布一些代码,但有点复杂。。。调度程序封装在一个“类”中,并使用事件激活。整个基础设施是一种框架的一部分,我不能简单地接受代码的一部分。我敢肯定的是,整个系统都能与旧版本兼容,但与新版本不兼容

到目前为止,唯一有效的解决方案是使用两个版本,每个页面一个。但是,当然,这是一种黑客行为,不好也不利于维护

下面是用于生成调度程序的代码<代码>\u schedulerType用于装箱每日或每周视图。在外部创建两个“容器”
\u schedulerOptions
\u scheduleServices
,用于定义如何创建计划程序

_schedulerContainer.fullCalendar({
    local (or lang): _schedulerOptions.language,
    allDaySlot: false,
    now: _currentDay,
    selectable: true,
    editable: false,
    aspectRatio: _schedulerOptions.aspectRatio,
    scrollTime: '07:30',
    slotDuration: '00:15:00',
    slotLabelInterval: '01:00:00',
    slotLabelFormat: _schedulerOptions.slotLabelFormat,
    slotWidth: _schedulerOptions.slotWidth,
    nowIndicator: true,
    customButtons: (_schedulerServices.schedulerHeader !== null) ?
        _schedulerServices.schedulerHeader.createCustomButtons() :
        null,
    header: (_schedulerServices.schedulerHeader !== null) ?
        _schedulerServices.schedulerHeader.createHeader() :
        false,
    defaultView: _schedulerType,
    -------------------REMOVE-----------------------------------------
    resourceLabelText: 'Rooms',
    resourceGroupField: _defaultOptions.groupBy,
    resourceOrder: _defaultOptions.orderBy,
    resources: 
      function (callback) {
        if (_schedulerServices.rscCallback !== null) {
          if (log) {
              console.log("reload resources inside scheduler");
          }

          callback(_schedulerServices.rscCallback.getResources());
        }
      },
    ------------------------------------------------------------------
    events: 
      function (start, end, timezone, callback) {
        if (_schedulerServices.evtCallback !== null) {
          if (log) {
            console.log("reload events inside scheduler");
          }
         callback(_schedulerServices.evtCallback.getEvents());
        }
      },
    -------------------REMOVE-----------------------------------------
    resourceRender: 
      function (resourceObj, element) {
        if (_schedulerServices.rscViewManager !== null) {
          return _schedulerServices.rscViewManager.requestRender(resourceObj, element);
        }
      },
    ------------------------------------------------------------------
    eventRender: 
      function (eventObj, element) {
        if (_schedulerServices.evtViewManager !== null) {
          return _schedulerServices.evtViewManager.requestRender(eventObj, element);
        }
      }
    });
任何帮助都将不胜感激! 谢谢


解决了

在2.6.0版之后,不应使用选项中未使用的选项字段。在我的例子中,删除所有与资源相关的字段就解决了这个问题