本文介绍了改变日历日的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 你好, 在我的项目中有一个日历,我想强调星期四的日历。但是像星期四的背景颜色,forcolor,粗体等我只想强调日历的所有星期四。hi there,in my project there is a calender, i want to highlight Thursdays in calender. however like backcolor of Thursdays, forcolor, bold etc. i just want to highlight all Thursdays of calender.推荐答案<asp:Calendar ID="Calendar1" runat="server" FirstDayOfWeek="Monday" NextPrevFormat="ShortMonth" DayNameFormat="Full" ondayrender="Calendar1_DayRender"> 在dayrender活动中写下以下代码Inside the dayrender event write the following codevoid Calendar1_DayRender(Object source, DayRenderEventArgs e){ if (e.Day.Date.DayOfWeek == DayOfWeek.Thursday) { e.Cell.ForeColor = Color.White; e.Cell.BackColor = Color.YellowGreen; }} 这篇关于改变日历日的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-02 06:00