Week View Component for react native
react-native-week-view
Week View Component for react native.
Props
events
(Array) - Events to displayonEventPress
(Function) - Callback when event item is clickednumberOfDays
(Number) - Set number of days to show in view, can be1
,3
,7
.dateHeaderFormat
(String) - Format for dates of header, default isMMM D
selectedDate
(Date) - Intial date to show week/days in viewonSwipeNext
(Function) - Callback when calendar is swiped to next week/daysonSwipePrev
(Function) - Callback when calendar is swiped to previous week/days
Event Object
{
id: 1,
description: 'Event',
startDate: new Date(),
endDate: new Date(),
color: 'blue',
}
TODO
- [x] allow to swipe between weeks or days.
- [ ] allow to set custom date format for header.
- [ ] allow to drag drop events to specific time and date.
- [ ] update example for more cases (1 day, 7 days).
- [ ] update document.