# scheduler-recurring-events

> Scheduler sample creating, editing, and managing recurring event patterns.

**Framework:** javascript  **Component:** Scheduler  **Variant:** recurring-events

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/javascript/scheduler-recurring-events.json
```

**Install Package(s)**

```bash
npm install @syncfusion/ej2-schedule
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/scheduler-recurring-events/scheduler.html

```html
<div class="col-lg-9 control-section">
    <div class="content-wrapper">
        <div id="container">
        </div>
    </div>
</div>
<div class="col-lg-3 property-section">
    <table id="property" title="Properties" style="width: 100%">
        <tbody>
            <tr style="height: 50px">
                <td style="width: 100%">
                    <input id="editFollowingEvents"type="checkbox" />
                </td>
            </tr>
        </tbody>
    </table>
</div>

```

### src/components/scheduler-recurring-events/scheduler.ts

```typescript
import { Schedule, Day, Week, Month, type EventRenderedArgs, Resize, DragAndDrop } from '@syncfusion/ej2-schedule';
import { extend } from '@syncfusion/ej2-base';
import { type ChangeEventArgs, CheckBox } from '@syncfusion/ej2-buttons';
import { recurrenceData } from '../datasource/scheduler-data';

Schedule.Inject(Day, Week, Month, Resize, DragAndDrop);

/**
 * Schedule Recurrence events sample
 */

export function initSchedulerRecurringEvents(): void {
    let data: Object[] = <Object[]>extend([], recurrenceData, null, true);
    let scheduleObj: Schedule = new Schedule({
        width: '100%',
        height: '650px',
        selectedDate: new Date(2021, 1, 20),
        views: ['Day', 'Week', 'Month'],
        eventSettings: { dataSource: data },
        eventRendered: (args: EventRenderedArgs) => applyCategoryColor(args, scheduleObj.currentView)
    });
    scheduleObj.appendTo('#container');
    let checkBoxObj: CheckBox = new CheckBox({
        label: 'Enable Following Events',
        checked: false,
        change: (args: ChangeEventArgs) => {
            scheduleObj.eventSettings.editFollowingEvents = args.checked;
        }
    });
    checkBoxObj.appendTo('#editFollowingEvents');
    function applyCategoryColor(args: EventRenderedArgs, currentView: string): void {
        let categoryColor: string = args.data.CategoryColor as string;
        if (!args.element || !categoryColor) {
            return;
        }
        if (currentView === 'Agenda') {
            (args.element.firstChild as HTMLElement).style.borderLeftColor = categoryColor;
        } else {
            args.element.style.backgroundColor = categoryColor;
        }
    }
}

```
