Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
485
How can I tell what the last scheduled day is when using range occurance count?
posted

Hello, is there a way to extract the date of the last occurrence instance when you’ve set the control to display a pattern with a selected number of occurrences? For instance I certainly know the end date when the occurrence pattern has a fixed end date, but when the range is set to “Number of occurrences” how do I know what the end date becomes? Is this code I’ll have to write or is there a way to ask the UltraMonthViewSingle for this information.

 

To further complicate the issue how do I know if there are any variances that may have eliminated a specific day in pattern thereby giving me only 9 occurrences instead of the (say) the requested 10?

 

When my users say they want 10 occurrences, they expect the program to give them 10 scheduled days regardless of holidays or other days where an occurrence cannot be scheduled(a variance). Then they want to know what the last occurrence date is. Does anyone have any ideas on how I can use the UltaMonthViewSingle control (or other means) to provide this information. Just knowing the last scheduled date would help with some schemes in figuring out the rest. I know I can see if there is a variance on a day within the pattern using the CalendarInfo.GetDay(EvalDate, True).Appointments and then add a day to my range to compensate for it. But knowing the end date that the control figured out would allow me to set some date range bounds to work within as well as letting the user know what the last date in the schedule is.

Thank you.

Parents
No Data
Reply
  • 69832
    Offline posted

    When you use a RangeLimit of 'LimitByNumberOfOccurrences' the RangeEndDate property will return the date of the last occurrence.

    Note that the AppointmentRecurrence.Variances collection contains references to the variances for that recurrence pattern.

Children
No Data