18
Answers

how to fill holiday and weekend in calender control?

Hardik Patel

Hardik Patel

11y
3.3k
1
how to fill holiday and weekend in calender control with different colours?

for example for Weekend = black colour;
                         holiday = sky blue;

i tried below code but it only shows only single colour for both weekend and holiday.

 if (dtholidays.Contains(e.Day.Date) || e.Day.IsWeekend)
        {
           
                e.Cell.BackColor = System.Drawing.Color.SkyBlue;
                e.Cell.ForeColor = System.Drawing.Color.White;
           
        }


Answers (18)