Recurrencing events where original event falls outside of filtered range

1 Answer 39 Views
Scheduler
Kyle
Top achievements
Rank 1
Kyle asked on 05 Aug 2024, 11:08 AM

I have a question regarding the recurrence rules for jobs where the original jobs and the instances of recurrence are not in the same searched range.

For example:

  1. If I have a job that has been running for over 2 years, starting at 2022-01-01.
  2. The recurrence rule is set to repeat every day with no end date.
  3. I want to return the events that occurring this week, how am I meant to get the instances of the recurring event without the original job being within the searched range?

1 Answer, 1 is accepted

Sort by
0
Nadezhda Tacheva
Telerik team
answered on 08 Aug 2024, 10:19 AM

Hi Kyle,

The Scheduler component generally does not provide a built-in filtering functionality and the filtering should be handled with a custom approach. The solution we have suggested in this demo is to basically change the Scheduler data depending on your filter criteria to simulate filtering. Is this the approach you are using on your end?

Before proceeding further, I want to list a key point for the recurring appointments. A recurring appointment is presented by a single record in the Scheduler data that includes the desired recurrence rule. The Scheduler uses that rule to make clonings of this item that will be visualized as its occurrences in the corresponding periods. The actual data, however, is not changed, it still contains only one record for the recurring appointment representing the whole series.

Having this in mind, the approach with programmatically filtering your collection and changing the Scheduler data will not deliver the result you are looking for. If the original (the one and only) recurring event is not within the searched range, the Scheduler cannot show the other instances of this recurring event as for the component, such event does not exist (considering you filter the data to a period after the original event). See an example: https://blazorrepl.telerik.com/GIuCaCkM40ofirzk47.

To achieve your desired behavior you will need to extend the custom filtering logic. It is not possible to show the actual occurrences in the time frame after the original but you may simulate them. For that purpose, you can programmatically add a regular appointment to the filtered data to simulate the occurrence. Note that this will not be an actual occurence and it will not have the built-in functionalities of an occurence - e.g. for editing, you will not have the "Edit Recurring Appointment" popup and the edit window will not contain the recurrence editor. That said, if you need to allow editing the simulated occurrence as part of an actual recurring appointment, you will need to customize the edit form.

    Regards,
    Nadezhda Tacheva
    Progress Telerik

    Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
    -> Start The State of Designer-Developer Collaboration Survey 2024

    Tags
    Scheduler
    Asked by
    Kyle
    Top achievements
    Rank 1
    Answers by
    Nadezhda Tacheva
    Telerik team
    Share this question
    or