Agenda Calendar App π
A modern agenda calendar application built with React Native and Expo. Features a clean design with dark/light mode support, smooth animations, and an intuitive user interface.
Download the zip file from the button at the bottom left. You will receive an Expo project. Install the necessary packages and run it using Expo Go. A development build is not required.
π Features
- Swipeable Calendar: Horizontal scrolling calendar with expandable month view
- Dark/Light Mode: Seamless theme switching with cohesive design
- Haptic Feedback: Enhanced user experience with tactile responses
- Day Selector: Horizontal scrolling day selector for quick navigation
- Month Picker: Easy month and year selection with modal interface
- Task Management: View and manage todos/events for each day
π Project Structure
agenda-calendar-app/
βββ app/ # Expo Router app directory
β βββ _layout.tsx # Root layout with theme provider
β βββ index.tsx # Main calendar screen
β βββ modal.tsx # Todo detail modal
β
βββ components/
β βββ calendar/ # π― Calendar components (main focus)
β βββ CalendarAgenda.tsx # Main calendar component
β βββ CalendarHeader.tsx # Custom header with month picker & theme toggle
β βββ DaySelector.tsx # Horizontal day selector
β βββ MonthPicker.tsx # Month/year picker modal
β βββ AgendaItem.tsx # Individual todo item component
β βββ EmptyDay.tsx # Empty state for days with no todos
β βββ date-helpers.ts # Date formatting utilities
β βββ theme.ts # π¨ Theme configuration (colors, styles)
β βββ types.ts # TypeScript type definitions
β βββ mock-data.ts # Sample todo data
β βββ index.ts # Component exports
β
βββ constants/
β βββ theme.ts # General app theme constants
β
βββ context/
β βββ ThemeContext.tsx # Theme context provider
β
βββ hooks/
βββ use-color-scheme.ts # Color scheme detection
βββ use-theme-color.ts # Theme color hookπ¨ Customizing the Calendar UI
Where to Update Calendar Styling
1. Theme Colors & Styles β components/calendar/theme.ts
This is the main file for customizing calendar appearance:
// Light mode theme
export const lightCalendarTheme = {
backgroundColor: "#F5F1EC",
selectedDayBackgroundColor: "#1A1A1A",
selectedDayTextColor: "#FFFFFF",
todayTextColor: "#1A1A1A",
dayTextColor: "#1A1A1A",
textDayHeaderFontSize: 13,
textDayFontSize: 17,
// ... more properties
};
// Dark mode theme
export const darkCalendarTheme = {
backgroundColor: "#0A0A0A",
selectedDayBackgroundColor: "#FFFFFF",
selectedDayTextColor: "#0A0A0A",
// ... more properties
};Key properties you can customize:
selectedDayBackgroundColor: Background color of selected dayselectedDayTextColor: Text color on selected daytodayTextColor: Color for today's datedayTextColor: Default day text colortextDayHeaderFontSize: Size of day headers (M, T, W, etc.)textDayFontSize: Size of date numberstextDayFontWeight: Weight of date numbers ("500", "600", etc.)
2. Calendar Component Styling β components/calendar/MonthPicker.tsx & components/calendar/DaySelector.tsx
The calendar components use react-native-calendars library. You can customize:
- Adjust the
stylesheet.day.basicconfiguration for custom day styling - Modify the
calendarThemeobject for advanced styling - Change day shape and size
Example: Changing selected day shape in MonthPicker:
"stylesheet.day.basic": {
base: {
width: 44,
height: 56,
borderRadius: 22,
},
selected: {
backgroundColor: isDarkMode ? "#FFFFFF" : "#1A1A1A",
borderRadius: 22,
},
// ...
}3. Agenda Item Styling β components/calendar/AgendaItem.tsx
Customize how individual todo items appear in the agenda list. Modify the styles constant at the bottom of the file to change:
- Card background and border colors
- Text colors and sizes
- Priority indicators
- Category badges
- Completion toggle styling
4. Header Styling β components/calendar/CalendarHeader.tsx
Modify the calendar header that shows month/year and theme toggle. Customize:
- Month text styling
- Today button appearance
- Theme toggle button
- Header background and spacing
Day Header Format
To change day headers (currently single letters: M, T, W), edit:
components/calendar/MonthPicker.tsx - LocaleConfig (if using react-native-calendars):
import { LocaleConfig } from "react-native-calendars";
LocaleConfig.locales["en"] = {
dayNamesShort: ["S", "M", "T", "W", "T", "F", "S"], // Change these
// ...
};components/calendar/DaySelector.tsx - Similar LocaleConfig setup if needed.
π§ Customizing Functionality
Adding/Modifying Todos
Mock Data Location: components/calendar/mock-data.ts
This file contains sample todos. To add your own data source:
- Replace the
mockTodosarray with your data - Update the
getTodosForDate()function to fetch from your API/database - Modify the
Todointerface incomponents/calendar/types.tsif needed
Example:
export const mockTodos: Todo[] = [
{
id: "1",
title: "Meeting with team",
date: "2024-01-15",
time: "10:00",
completed: false,
priority: "high",
category: "Work",
categoryColor: "#2D8A56",
},
// ... more todos
];Calendar Behavior
Main Component: components/calendar/CalendarAgenda.tsx
Key functions you can modify:
buildDayTimeline(): Number of days to show in timeline (default: 30)handleDayPress(): Behavior when a day is tappedhandleTodoToggle(): Behavior when a todo is toggledscrollToDate(): How scrolling to a date works
Example: Change number of days shown:
function buildDayTimeline(baseDate: string, totalDays: number = 30) {
// Change 30 to your desired number of days
// ...
}Date Formatting
Utilities: components/calendar/date-helpers.ts
Contains helper functions:
parseDateString(): Parses YYYY-MM-DD format stringgetMonthYear(): Returns formatted "Month Year" stringgetDateString(): Converts Date object to YYYY-MM-DD stringgetTodayString(): Returns today's date as YYYY-MM-DD stringisToday(): Checks if date string is today
π± Usage
Basic Setup
-
Install dependencies:
bashnpm install -
Start the development server:
bashnpx expo start -
Run on your platform:
bash# iOS npm run ios # Android npm run android
ποΈ Key Files Reference
| File | Purpose |
|---|---|
components/calendar/CalendarAgenda.tsx | Main calendar component with day selector and agenda |
components/calendar/theme.ts | π¨ All theme colors and styling |
components/calendar/date-helpers.ts | Date formatting and utility functions |
components/calendar/types.ts | TypeScript interfaces for todos and calendar data |
components/calendar/mock-data.ts | Sample data for development |
components/calendar/MonthPicker.tsx | Month/year picker modal with calendar |
components/calendar/DaySelector.tsx | Horizontal day selector component |
app/index.tsx | Main screen that uses CalendarAgenda |
context/ThemeContext.tsx | Theme state management |
π― Quick Customization Guide
Change Selected Day Color
β Edit components/calendar/theme.ts β selectedDayBackgroundColor in lightCalendarTheme or darkCalendarTheme
Change Day Header Size
β Edit components/calendar/theme.ts β textDayHeaderFontSize
Change Selected Day Shape
β Edit components/calendar/MonthPicker.tsx β stylesheet.day.basic.base.borderRadius (22 = circle, 8 = rounded rectangle, 0 = square)
Change Day Text Size
β Edit components/calendar/theme.ts β textDayFontSize
Change Agenda Item Colors
β Edit components/calendar/theme.ts β agendaColors.light or agendaColors.dark object
Add Custom Styling to Days
β Edit components/calendar/MonthPicker.tsx or components/calendar/DaySelector.tsx β calendarTheme object
Change Number of Days in Timeline
β Edit components/calendar/CalendarAgenda.tsx β buildDayTimeline() function β totalDays parameter (default: 30)
π οΈ Dependencies
- react-native-calendars: Calendar component library
- expo-haptics: Haptic feedback
- expo-router: File-based routing
- react-native-reanimated: Animations
- @expo/vector-icons: Icon library (Ionicons)
- react-native-safe-area-context: Safe area handling
π Type Definitions
All calendar-related types are defined in components/calendar/types.ts:
Todo: Todo item structureWeekDay: Day in the timelineMarkedDate: Calendar marking configurationDayData: Day with associated todos
Todo Interface:
interface Todo {
id: string;
title: string;
description?: string;
date: string; // YYYY-MM-DD format
time?: string; // HH:mm format
endTime?: string; // HH:mm format
completed: boolean;
priority: "low" | "medium" | "high";
category?: string;
categoryColor?: string;
}π¨ Theme System
The app uses a dual theme system:
-
Calendar Theme (
components/calendar/theme.ts): Specific to calendar componentlightCalendarTheme/darkCalendarTheme: For react-native-calendarsagendaColors.light/agendaColors.dark: For agenda components
-
App Theme (
constants/theme.ts): General app colors
Both support light and dark modes and are synchronized for a cohesive experience.
Issue Reporting
If you find any issues with the code, please report them to us at reactnativecomponents.com
π License
This is built under reactnativecomponents.com, please do not sell this code or share with people who did not get the pro. If we find out you are selling this code, we will take legal action and your name will be shared publicly. Show respect for the work I put into.
Happy coding! π