When i click on column header of the radcalendar it selects all the days of week for that month, ie. When i click on 'W' then it selects all the Wednesdays for that month. But what i want is when i click on 'W' then it should select all the Wednesdays for an entire date range (range i have set using rangemindate and rangemaxdate span across 10 months) after asking a confirmation
For this i have done the following
string day = "Wednesday"; // i am setting this value dynamically through client side OnColumnHeaderClick
for (DateTime date = rangeStart; date.CompareTo(rangeEnd) < 1; date = date.AddDays(1))
if (day == Enum.GetName(typeof(DayOfWeek), date.DayOfWeek))
RadDate rd = new RadDate(date);
This works perfectly when selecting dates. Now if i click on the same column header again i want to remove all the "wednesdays" for the entire date range. To remove i have done the following
DayOfWeek dow = (DayOfWeek)Enum.Parse(typeof(DayOfWeek), day);
for (int i = 0; i < radCalendarAM.SelectedDates.Count; i++)
RadDate date = (RadDate)radCalendarAM.SelectedDates[i];
if (date.Date.DayOfWeek == dow)
But this code does'nt remove all the Wednesdays in the date range, it leave behind alternate wednesdays (or which ever day) selected.
Can you advice on this?