[英]big calendar react Can we have multiple color on different dates of Month?
big calendar react Can we have multiple color on different dates of Month?大日历反应我们可以在一个月的不同日期使用多种颜色吗?
Suppose: Every Date on month will have different color according to its events.假设:一个月中的每个日期都会根据其事件具有不同的颜色。
The dayPropGetter does allow you to set styling in the month view, according to date, but it does not have access to other calendar props (like events
) dayPropGetter确实允许您根据日期在月视图中设置样式,但它无法访问其他日历道具(如
events
)
Method signature:方法签名:
(date: Date) => { className?: string, style?: Object }
Usage:用法:
const dayPropGetter = (date) => {
// build some className from the `date` and/or
// build some style definition from the `date` data
return { className, style }
}
<Calendar dayPropGetter={dayPropGetter} />
So, if you wanted to highlight every Wednesday, or weekend days, or 'today' in some manner, you could use this to do that.因此,如果您想以某种方式突出显示每个星期三、周末或“今天”,您可以使用它来做到这一点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.