我正在尝试根据事件和这些事件占用的小时数动态更改全日历控件中日期的背景颜色。下面是我的示例代码,没有我的实际逻辑,只是想看看它是否默认设置。
看到一些建议使用 dayRender(date,cell)
的链接,但它在角度和以下代码中使用 dayCellContent(date,cell)
给出错误也给出了 css 不是单元格函数的错误。
答案 0 :(得分:1)
我们在 Angular 下面使用了在月视图中以不同颜色显示周六和周日
cross = df1[['id_number']].merge(df2[['identity_no']].assign(tmp=0), how='outer', on='tmp').drop(columns='tmp'))
cross['match'] = cross.apply(lambda x: fuzz.ratio(x.id_number, x.identity_no), axis=1)
df1['match_acc'] = df1.id_number.map(cross.groupby('id_number').match.max())
for index, row in df1.iterrows():
for index2, config2 in df2.iterrows():
if row['match_acc'] >= 75:
df1['id_number'][index] = config2['identity_No']
df1['company_name'][index] = config2['comp_name']
df1['company_code'][index] = config2['comp_code']
df1['score'][index] = config2['OR_Score']