Hi Laurel,
Thank you for contacting Syncfusion support.
You can get the date time of last recurrence from the collection of recurrence appointment with end date using GetRecurrenceDateTimeCollection method of ScheduleHelper class. Kindly refer the below example and code snippet.
Code snippet:
|
public static IEnumerable<DateTime> GetRecurrenceDateTimeCollection(stringRRule, DateTime RecStartDate, DateTime? specificStartDate = null, DateTime? specificEndDate = null)
{
...
} |
Where,
RRule - RRule of recurrence appointment.
RecStartDate - Start date of recurrence appointment.
specificStartDate - Optional parameter, can be passed to get the occurrences of recurrence appointment from specified start date of date ranges.
specificEndDate - Optional parameter, can be passed to get the occurrences of recurrence appointment up to the specified end date of date ranges.
Code snippet:
|
var recurrenceCollection = ScheduleHelper.GetRecurrenceDateTimeCollection(appointment.MappedRecursiveRule, appointment.MappedStartTime); |
Note:
You can get the date time collection within the specific range when the recurrence appointments has no end date.
Regards,
Deivaselvan