A modern React application featuring FullCalendar with Resource Timeline Day View, complete with drag-and-drop, resize functionality, and Redux state management.
- β Resource Timeline Day View - Visualize events across multiple resources (rooms, people, equipment)
- β Drag & Drop - Move events between time slots and resources
- β Event Resizing - Resize events from both start and end
- β Interactive Selection - Click and drag to create new events
- β Multiple Views - Switch between Day, Week, and Month views
- β Event Details Drawer - Beautiful slide-up drawer with comprehensive event information
- β Redux State Management - Centralized state with Redux Toolkit
- β Component Architecture - Modular, reusable components
- β Real-time Updates - Events update dynamically through Redux actions
- β Modern UI - Beautiful gradients, smooth animations, and responsive design
{
"@fullcalendar/core": "^6.x.x",
"@fullcalendar/react": "^6.x.x",
"@fullcalendar/resource-timegrid": "^6.x.x",
"@fullcalendar/interaction": "^6.x.x",
"@fullcalendar/daygrid": "^6.x.x",
"@reduxjs/toolkit": "^2.x.x",
"react-redux": "^9.x.x"
}The project is already set up with all dependencies. If you need to reinstall:
npm installStart the development server:
npm run devThe application will open at http://localhost:5173
fullcalendar-react/
βββ src/
β βββ components/
β β βββ Calendar.jsx # FullCalendar component
β β βββ Calendar.css # Calendar-specific styles
β β βββ EventDrawer.jsx # Event details drawer
β β βββ EventDrawer.css # Drawer styles
β β βββ EventList.jsx # Event list component
β β βββ EventList.css # Event list styles
β βββ store/
β β βββ store.js # Redux store configuration
β β βββ calendarSlice.js # Calendar state slice with actions
β βββ App.jsx # Main app component with Provider
β βββ App.css # App-specific styles
β βββ index.css # Global styles
β βββ main.jsx # Entry point
βββ package.json
βββ vite.config.js
The application uses Redux Toolkit for state management with the following structure:
{
calendar: {
resources: [...], // Array of resource objects
events: [...] // Array of event objects
}
}The calendar slice provides these actions:
addEvent(event)- Add a new event to the calendarupdateEvent(event)- Update an existing event (used for drag/drop and resize)deleteEvent(eventId)- Remove an event from the calendaraddResource(resource)- Add a new resourceupdateResource(resource)- Update an existing resourcedeleteResource(resourceId)- Remove a resource
import { useDispatch } from "react-redux";
import { addEvent, updateEvent } from "./store/calendarSlice";
const dispatch = useDispatch();
// Add a new event
dispatch(
addEvent({
id: "7",
resourceId: "a",
title: "New Meeting",
start: "2025-12-24T10:00:00",
end: "2025-12-24T11:00:00",
})
);
// Update an event
dispatch(
updateEvent({
id: "1",
start: "2025-12-24T11:00:00",
end: "2025-12-24T12:00:00",
})
);The calendar displays 4 sample resources:
- Conference Room A
- Conference Room B
- Meeting Room C
- Training Room D
6 pre-configured events with different:
- Time slots
- Resource assignments
- Color schemes
- Durations
- handleEventDrop - Triggered when an event is dragged to a new time/resource
- handleEventResize - Triggered when an event duration is changed
- handleEventClick - Shows event details on click
- handleDateSelect - Creates new events by selecting time slots
<FullCalendar
plugins={[resourceTimeGridPlugin, interactionPlugin, dayGridPlugin]}
initialView="resourceTimeGridDay"
editable={true}
selectable={true}
eventResizableFromStart={true}
nowIndicator={true}
slotMinTime="08:00:00"
slotMaxTime="18:00:00"
// ... more options
/>Edit the resources state in App.jsx:
const [resources] = useState([
{ id: "e", title: "Your New Resource" },
// ... more resources
]);Add to the events state:
{
id: '7',
resourceId: 'a',
title: 'New Event',
start: '2025-12-24T09:00:00',
end: '2025-12-24T10:00:00',
backgroundColor: '#your-color',
borderColor: '#your-border-color'
}Modify the slotMinTime and slotMaxTime props:
slotMinTime = "06:00:00"; // Start at 6 AM
slotMaxTime = "22:00:00"; // End at 10 PMThe application uses a modern design with:
- Gradient backgrounds for visual appeal
- Smooth transitions on hover and interactions
- Shadow effects for depth
- Responsive design for mobile compatibility
- Custom FullCalendar theme matching the overall design
For more advanced features and customization:
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build
This project is open source and available under the MIT License.
Feel free to fork, modify, and use this implementation for your projects!
Built with β€οΈ using React + Vite + FullCalendar