The WeekCalendar component displays a horizontal scrollable week view, perfect for showing a focused weekly calendar interface.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Emendate/react-native-calendars/llms.txt
Use this file to discover all available pages before exploring further.
The WeekCalendar should be wrapped with
CalendarProvider to work properly.Basic usage
Props
WeekCalendar extends all CalendarList props.Display options
Whether to have shadow/elevation for the calendar.
Hide day names (Mon, Tue, etc.) at the top of the week calendar.
First day of the week (0 = Sunday, 1 = Monday).
Calendar styling
Theme object for styling the calendar.
Custom style for the week calendar container.
Width of the calendar. Defaults to screen width.
Marking dates
Collection of dates that need to be marked. Only dates visible in the current week will be shown.
Event handlers
Handler which gets executed on day press. If not provided, the CalendarProvider’s
setDate will be used.Context props
When used with CalendarProvider, the WeekCalendar automatically receives:date- Current selected datenumberOfDays- Number of days to display (for custom day ranges)setDate- Function to update the selected datetimelineLeftInset- Left inset for timeline integration
Accessibility
Test identifier for automated testing.
Examples
Basic week calendar
Week calendar with custom theme
Week calendar without shadow
Week calendar with marked dates
Week calendar with custom day count
Week calendar without day names
Complete example with timeline
Internal behavior
The WeekCalendar component:- Renders a horizontal FlatList with multiple weeks (6 pages before and after the current week)
- Automatically syncs with CalendarProvider’s date
- Handles week navigation through scrolling
- Updates the parent context when scrolling to a different week
- Supports custom number of days through CalendarProvider’s
numberOfDaysprop
Notes
The WeekCalendar only displays marked dates that are visible in the current week. Dates outside the visible week range will not show their markings.
When using
numberOfDays in CalendarProvider, the WeekCalendar will display that number of days instead of the full week.Related components
- CalendarProvider - Required wrapper component
- ExpandableCalendar - Uses WeekCalendar internally
- Timeline - Can be used together for a weekly schedule view