MCPcopy Create free account
hub / github.com/code100x/cms / onEventDrop

Function onEventDrop

src/components/big-calendar/calendar.tsx:173–186  ·  view source on GitHub ↗
(args: EventInteractionArgs<CalendarEvent>)

Source from the content-addressed store, hash-verified

171 };
172
173 const onEventDrop = (args: EventInteractionArgs<CalendarEvent>) => {
174 if (isAdmin && args.event) {
175 const updatedEvent: CalendarEvent = {
176 ...args.event,
177 start: new Date(args.start),
178 end: new Date(args.end),
179 };
180 handleUpdateEvent({
181 ...updatedEvent,
182 startTime: format(updatedEvent.start, 'HH:mm'),
183 endTime: format(updatedEvent.end, 'HH:mm'),
184 });
185 }
186 };
187
188 const onEventResize = (args: EventInteractionArgs<CalendarEvent>) => {
189 if (isAdmin && args.event) {

Callers

nothing calls this directly

Calls 1

handleUpdateEventFunction · 0.85

Tested by

no test coverage detected