react-big-calendar-dnd-typescript
Installation
SKILL.md
react-big-calendar Drag-and-Drop TypeScript Integration
Problem
When adding drag-and-drop functionality to react-big-calendar with TypeScript, you encounter multiple type errors that aren't obvious from the documentation. The main module doesn't export all necessary types, and the DnD wrapper requires explicit generic parameters.
Context / Trigger Conditions
Error 1: TS2305: Module '"react-big-calendar"' has no exported member 'EventInteractionArgs'
Error 2: TS2339: Property 'children' does not exist on type 'EventWrapperProps<CalendarEvent>'
Error 3: Type 'stringOrDate' is not assignable to type 'Date' in drag handlers
When you see these:
- Adding
withDragAndDropHOC to Calendar component - Implementing
onEventDroporonEventResizehandlers - Using custom
EventWrappercomponent with context menus or tooltips - TypeScript strict mode enabled