Blocks / Recurrence editor

Recurrence editor

Every n days, weeks, months or years, on some weekdays, until a date or after n times; the sentence and the next dates.

import { RecurrenceEditor, expandRecurrence, describeRecurrence, recurrenceToRrule, parseRrule } from "@forgeron/ui";
/01 → Weekly
Every
Unit
times

Every 2 weeks on Monday and Wednesday, 6 times

  1. Wednesday 18 November 2026
  2. Monday 30 November 2026
  3. Wednesday 2 December 2026
Repeats every 2 weeks.
import { RecurrenceEditor } from "@forgeron/ui";

export default function Weekly() {
  return (
    <RecurrenceEditor
      start="2026-11-18"
      defaultValue={{
        frequency: "weekly",
        interval: 2,
        weekdays: [0, 2],
        end: { kind: "count", count: 6 },
      }}
    />
  );
}
API → Props
PropTypeDefaultDescription
value / defaultValueRecurrence | null—{ frequency, interval, weekdays?, end: never | until | count }; null does not repeat. Controlled or not.
onChange(rule: Recurrence | null) => void—On every edit.
startstring—The first date, YYYY-MM-DD: the weekday and the day of the month come from it.
previewnumber3How many next dates to list.
optionalbooleantrueThe Repeat switch.
frequenciesRecurrenceFrequency[]all fourThe units offered.
disabledboolean—Read only.
classNamestring—Extra classes.