Demo
RecurrenceEditor
Documented in RecurrenceEditor.
RecurrenceEditor
A controlled recurrence rule editor that emits an RRULE string, with the next occurrences expanded in Europe/Berlin.
Repeat
week
Repeat on
End
Rule: FREQ=WEEKLY;BYDAY=MO,WE;COUNT=10
Next: 2026-11-23T09:00:00, 2026-11-25T09:00:00, 2026-11-30T09:00:00, 2026-12-02T09:00:00, 2026-12-07T09:00:00
Demo.tsx
'use client';
import { useState } from 'react';
import { getRecurrenceDates, RecurrenceEditor } from '@salmonui/scheduler';
/** A controlled RecurrenceEditor with its RRULE string and the next occurrences from the pure helpers. */
export default function CalendarRecurrenceEditorDemo() {
const [rule, setRule] = useState<string | null>('FREQ=WEEKLY;BYDAY=MO,WE;COUNT=10');
const next = rule ? getRecurrenceDates(rule, { start: '2026-11-23T09:00', timeZone: 'Europe/Berlin', maxCount: 5 }) : [];
return (
<div className="demo-stack">
<RecurrenceEditor value={rule} onValueChange={setRule} start="2026-11-23T09:00" />
<p className="demo-status" aria-live="polite">
Rule: <code>{rule ?? 'null (never)'}</code>
</p>
<p className="demo-status">
Next: <code>{next.map(String).join(', ') || 'none'}</code>
</p>
</div>
);
}
Choose a repeat type, the weekdays or the day of the month, and how the
series ends. The editor emits the RRULE string (null for "never"); the
list below expands it with getRecurrenceDates.