I have an ASP.NET Calendar control on my web form.
I have defined a date range with a StartDate and an EndDate and now I need to make all the days in between (including the StartDate and EndDate) red.
How I can do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can handle the
Calendar.DayRenderevent and customize the appearance of the cells within your date range. A complete example is on the MSDN documentation page, but the most important part is:You just need to adapt the
Ifto compare the day to your custom range and change the background color from yellow to red.