Recurrence Editor
Edits how something repeats: every N days, weeks, months or years, weekdays, the third Tuesday, an end; reads and writes RRULE or cron.
c2-recurrence-editor is the custom recurrence form of Google Calendar and Outlook, of a repeating invoice or a maintenance schedule: pick a frequency, an interval (“every 2 weeks”), the weekdays, the day of the month or “the third Tuesday”, the month of a yearly rule, and how it ends (never, on a date, after N occurrences). A sentence sums the rule up and the next occurrences show under it.
value is an RFC 5545 RRULE (FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,WE;COUNT=10). With format="cron" it is a five-field cron expression instead (30 9 * * 1-5), the schedule of a job: the editor then offers only what cron can say (a time of day, steps that divide their range, no end). start is the first occurrence, which seeds the weekday, the day and the month when the frequency changes; frequencies lists the frequencies offered (add none for “Does not repeat”, an empty value); with-time adds a time-of-day row. It is a form control: the form receives value under name. The same rule is always available as rule (an object), toRRule() and cron, and parseRRule, formatRRule, parseCron, formatCron, occurrences and describeRecurrence are exported for tables and servers.
Import
import '@c2n/components/recurrence-editor'Usage
Every 2 weeks on Monday and Wednesday, 10 times
- Mon, Nov 16, 2026
- Wed, Nov 18, 2026
- Mon, Nov 30, 2026
- Wed, Dec 2, 2026
- Mon, Dec 14, 2026
Every month on the third Tuesday, until Dec 31, 2027
- Tue, Nov 17, 2026
- Tue, Dec 15, 2026
- Tue, Jan 19, 2027
Every weekday at 9:30 AM
- Mon, Nov 16, 2026, 9:30 AM
- Tue, Nov 17, 2026, 9:30 AM
- Wed, Nov 18, 2026, 9:30 AM
Does not repeat
Every day
Next occurrences count from start (today when it is not set) in wall-clock time: a rule repeats “at 09:00” wherever it is read. RRULE parts the editor does not edit (BYYEARDAY, several BYMONTHDAYs) are kept as written, and the next occurrences are then hidden because they would ignore them. Inside a c2-form-field, the field’s label names the editor’s group.