【问题标题】:How to render events on different row in React-big-calender day and week view?如何在 React-big-calendar 日和周视图中呈现不同行的事件?
【发布时间】:2021-07-19 04:13:04
【问题描述】:

我正在使用 react-big-calendar 来呈现事件,并且我使用月、周、日视图。在月视图中一切正常,但如果有多个事件具有相同的时隙,那么它将呈现在一行中(参考下图)。有没有办法按列呈现事件?另外,react-big-calendar 有什么好的替代品吗?

【问题讨论】:

    标签: reactjs react-big-calendar


    【解决方案1】:

    很遗憾,文档站点已过时,或者您会知道新的 dayLayoutAlgorithm 属性。从更新的文档中(可通过克隆 repo 并运行“示例”获得):

    dayLayoutAlgorithm

    一天的事件布局(排列)算法。

    overlap 允许事件重叠。

    no-overlap 调整事件大小以避免重叠。

    或自定义 `Function(events, minimumStartDifference, slotMetrics, 访问器)

    输入:custom

    默认:overlap

    【讨论】:

      猜你喜欢
      • 2022-06-29
      • 1970-01-01
      • 2022-06-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-03
      • 1970-01-01
      相关资源
      最近更新 更多