Author: cubangt | Posted on: 12/30/2009 12:44:40 PM | Views : 499

I have a calendar control on my page and so far i have been able to  set it up so that only 45 days worth are selectable. Now within those 45, i have 14days that i want to highlight so they know that those days are their current pay period.
This is what i have, but cant seem to figure out what im missing or not doing. I have a procedure that returns the 14 days i need to highlight those days when the calendar is rendered. My getPayPeriod() returns a list of 14 dates.
Here is my DayRender event
protected void DayRender(Object source, DayRenderEventArgs e) { // Change the background color of the days in the month. if (!e.Day.IsOtherMonth && !e.Day.IsWeekend) e.Cell.BackColor = System.Drawing.Color.Gray; DateTime dt = DateTime.Today.AddDays(30); DateTime minDate = Convert.ToDateTime(getPayPeriod()); if (e.Day.Date >= dt.Date) { ...

Go to the complete details ...