Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在反应大日历中更改特定日期的背景单元格颜色。有什么自定义的方法吗?
您可以设置 eventPropGetter 函数,该函数从单元格中获取事件并返回具有适当样式的对象,例如:
<Calendar eventPropGetter={event => ({ style: { backgroundColor: event.start.getDay() < 5 ? "#ad4ca4" : "#3174ad", } })} />