views:

440

answers:

2

I have an UltraCalendarCombo calendar control that I need to disable a set of dates in (weekends and public holidays basically).

I iterate through the list of dates for that month and set all the corresponding dates to disabled, this makes the current month look alright, but when I click the next month button on the control and try to access a month past now + 3 or 4 it jumps back to this month.

Has anyone any idea what this control is smoking, and where I can get some?

            DateTimeCollection badDates = getMeSomeBadDatesmonth, year);

            foreach (DateTime date in badDates)
            {
                myForm.CalendarInfo.DaysOfMonth[date.Day].Enabled = false;
            }
+1  A: 

Their controls have been going downhill for some time. I want to know what they are all smoking over there. I have been using their controls since the 2004 version of Net Advantage(which I really liked), but I have given up on using them on any new development. The bloat of features has broken what functionality did work and the documentation is just horrendous :(

Jim Petkus
+1  A: 

Sorted it, the DaysOfMonth collection applies to a specific day (by number) of all months. For example, DaysOfMonth[10] applies to the tenth of every month of the year.

So I needed to use:

Infragistics.Win.UltraWinSchedule.Day theDay = _form.ValueDateCalInfo.GetDay(date, true);
if (theDay != null) theDay.Enabled = false;
half_brick