Components · Input
EventEditor
Full event create/edit form. Handles participant and resource pickers, recurrence rules, and pre-submit validation against the engine.
Key points
- Two modes: create (initialValues) and edit (eventId)
- Built-in pickers for primary entity, participants, and resources
- Recurrence rule builder when the event type allows series
- Runs a conflict-detect call before onSubmit fires — surfaces 409s in-form
Import
import { EventEditor } from '@flexischeduler/scheduling-components';Create mode
<EventEditor
mode="create"
initialValues={{
eventType: 'home_visit',
primaryEntityId: 'ent_pt_9001',
startTime: selectedSlot.startTime,
endTime: selectedSlot.endTime,
}}
onSubmit={async (event) => {
const created = await api.createEvent(event);
navigate(`/events/${created.id}`);
}}
/>Reference
Props
Name
Type
Description
moderequired
"create" | "edit"Editor mode
initialValuesPartial<Event>Prefill fields (create mode only)
eventIdstringEvent to edit (edit mode only)
showRecurrencebooleandefault: true
Show recurrence rule builder
allowResourceOverridebooleandefault: false
Let users override engine resource suggestions
submitLabelstringdefault: "Save"
Submit button label
Events
Event
Payload
Fires when
onSubmit(values: EventDto) => Promise<void>Form submitted; consumer calls the engine
onCancel() => voidUser cancelled editing
onValidationError(errors: Record<string, string>) => voidPre-submit validation failed
Slots
Slot
Description
headerAbove the form fields
footerBelow the action buttons (e.g. additional metadata, custom hints)
Edit mode
<EventEditor
mode="edit"
eventId="evt_b29f4e58"
onSubmit={async (changes) => {
await api.updateEvent(eventId, changes);
refetch();
}}
onCancel={() => navigate(-1)}
/>Recurrence is event-type aware
The recurrence rule builder only renders if the event type configured in your template allows series. The component checks this automatically — you don’t need to gate the prop.