Hi,
I am using the method UltraWinSchedule.AppointmentRecurrence.GetAppointmentsInRange(DateTime rangeStart,DateTime rangeEnd) to calculate instances of a recurring appointment. In the case of the option RangeLimit being set to LimitByNumberOfOccurrences, I don't know the end date of the range. Therefore I pass DateTime.MaxValue as the rangeEnd parameter.
This worked fine with version 10.2.20102.1004, but in version 10.2.20102.2151 the method throws this exception:
ExceptionType: System.ArgumentOutOfRangeException
Der addierte oder subtrahierte Wert ergibt eine nicht darstellbare DateTime.The added or subtracted value results in an un-representable DateTime.Parametername: value bei System.DateTime.AddTicks(Int64 value) bei Infragistics.Win.UltraWinSchedule.DateRecurrence.GenerateOccurrences(ArrayList list, DateTime rangeStartDate, DateTime rangeEndDate, RecurrenceEngineTaskType task) bei Infragistics.Win.UltraWinSchedule.AppointmentRecurrence.GetAppointmentsInRange(DateTime rangeStart, DateTime rangeEnd)
What are the allowed limits for rangeStart and rangeEnd?
Hello mgraf,
I was able to reproduce this. It seems that the second argument you are giving to 'GetAppointmentsInRange()' is outside the cap of the ultraCalendarInfo instance. Please take a look at my code sample:
DateTime dt = DateTime.Now; Appointment dailyAppt = this.ultraCalendarInfo1.Appointments.Add(dt, dt.AddHours(3d), "new"); dailyAppt.Recurrence = new AppointmentRecurrence(); dailyAppt.Recurrence.PatternFrequency = RecurrencePatternFrequency.Weekly; dailyAppt.Recurrence.RangeLimit = RecurrenceRangeLimit.LimitByNumberOfOccurrences; AppointmentsSubsetCollection collection = ultraCalendarInfo1.GetAppointmentsInRange(DateTime.Today, ultraCalendarInfo1.MaxDate);
You could read the information at the following link:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/Infragistics2.Win.UltraWinSchedule.v11.1~Infragistics.Win.UltraWinSchedule.AppointmentRecurrence~RangeEndDate.html.
I think that this could be in help for you in order to achieve what you are looking for.
Please do not hesitate to ask if something comes up.