You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

基于@fullcalendar/react实现层级任务三月日历视图可行性咨询

React日历视图集成需求与问题

我需要在React应用中集成日历视图,用来展示包含子任务的活动,需求截图如下:
需求截图

核心需求:

  • 显示三个月的活动与任务
  • 父级活动支持展开/收起
  • 支持横向滚动视图

我已尝试使用@fullcalendar/react免费版,但未能实现上述需求。如果付费版可以满足需求,我会考虑购买。

以下是我尝试的代码:

React组件代码

<FullCalendar
stickyFooterScrollbar={true}
dayMinWidth={150}
ref={calendarRef}
schedulerLicenseKey='CC-Attribution-NonCommercial-NoDerivatives'
plugins={[
  interactionPlugin,
  resourceTimelinePlugin,
  dayGridPlugin,
  multiMonthPlugin,
  scrollgridPlugin,
  timelinePlugin
  // timeGridPlugin,
]}
headerToolbar={{
  left: 'today,prev,next',
  center: '',
  right: '',
  // 'next,customWeeks,dayGridMonth,timeGridWeek,resourceTimelineWeek',
}}
initialView='customWeeks'
// slotMinWidth={'100px'}
filterResourcesWithEvents={true}
selectOverlap={true}
slotEventOverlap={true}
eventOverlap={false}
views={{
  customWeeks: {
    eventOverlap: false,
    type: 'timelineWeek',
    duration: { months: 3 },
    slotDuration: { days: 7 },
    dateIncrement: { months: 3 },
    buttonText: 'Custom Week',
    slotMinWidth: 70,
  },
}}
events={events}
resourceAreaWidth='160px'
weekNumbers={true}
resourceAreaHeaderContent=' '
display_mode={{
  tooltip: true,
}}
resources={resources}
editable={true}
selectable={true}
selectMirror={true}
dayMaxEvents={true}
weekends={calendarState.weekendsVisible}
allDaySlot={false}
eventDidMount={EventDetail1} />

依赖脚本

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>

内容的提问来源于stack exchange,提问作者Shubham

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.20 10:23:14