new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Mantine · all subjects

schedule/callbacks

11 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

onEventClick callback payload

onEventClick is called when an event is clicked in any view with payload: event (ScheduleEventData, includes recurringInstance metadata if generated occurrence) and e (native React.MouseEvent<HTMLButtonElement>).

onEventDrop callback payload

onEventDrop is called after event drag (requires withEventsDragAndDrop) with payload containing: eventId (string | number, for recurring instances is '<seriesId>::<recurrenceId>'), newStart (DateTimeStringValue in 'YYYY-MM-DD HH:mm:ss'), newEnd (DateTimeStringValue), and event (full ScheduleEventData with recurringInstance metadata if applicable). Use event.recurringInstance?.recurringEventId to get parent series id for occurrences.

onEventResize callback payload

onEventResize is called when an event is resized by dragging edge (requires withEventResize) with same payload shape as onEventDrop: eventId, newStart, newEnd, and event. For generated recurring instances, eventId is '<seriesId>::<recurrenceId>'.

onEventDragStart and onEventDragEnd callbacks

onEventDragStart is called when drag starts with event (ScheduleEventData). onEventDragEnd is called when drag ends (both successful drops and cancelled drags) with no parameters. Use onEventDrop if new position is needed.

onTimeSlotClick callback payload

onTimeSlotClick is called when time slot clicked in DayView or WeekView with payload: slotStart (DateTimeStringValue in 'YYYY-MM-DD HH:mm:ss'), slotEnd (DateTimeStringValue), and nativeEvent (React.MouseEvent<HTMLButtonElement>). Slot length controlled by view's intervalMinutes prop.

onAllDaySlotClick callback payload

onAllDaySlotClick is called when all-day slot clicked in DayView or WeekView with payload: date (DateStringValue in 'YYYY-MM-DD' format) and event (React.MouseEvent<HTMLButtonElement>).

onDayClick callback payload

onDayClick is called when day clicked in MonthView or YearView with payload: date (DateStringValue in 'YYYY-MM-DD' format) and event (React.MouseEvent<HTMLButtonElement>).

onSlotDragEnd callback payload

onSlotDragEnd is called when slot range selected by dragging (requires withDragSlotSelect) with payload: rangeStart (DateTimeStringValue in 'YYYY-MM-DD HH:mm:ss') and rangeEnd (DateTimeStringValue).

onExternalEventDrop callback payload

onExternalEventDrop is called when item dragged from outside schedule and dropped onto slot with payload: dataTransfer (native DataTransfer object set by external item's onDragStart, read custom data with dataTransfer.getData(type)) and dropDateTime (DateTimeStringValue in 'YYYY-MM-DD HH:mm:ss' format).

canDragEvent and canResizeEvent permission callbacks

canDragEvent and canResizeEvent are permission callbacks that take event (ScheduleEventData) parameter and return boolean. Return false to prevent dragging or resizing for specific event.

RecurringInstanceMeta reading in onEventClick

Example reading recurring instance metadata: <Schedule events={events} onEventClick={(event) => { if (event.recurringInstance?.isRecurringInstance) { console.log('Clicked generated occurrence of', event.recurringInstance.recurringEventId); } else { console.log('Clicked regular event', event.id); } }} />

Give your agent this brain