react-native-week-view

Week View Component for react native.

react-native-week-view

Props

  • events (Array) - Events to display
  • onEventPress (Function) - Callback when event item is clicked
  • numberOfDays (Number) - Set number of days to show in view, can be 1, 3, 7.
  • dateHeaderFormat (String) - Format for dates of header, default is MMM D
  • selectedDate (Date) - Intial date to show week/days in view
  • onSwipeNext (Function) - Callback when calendar is swiped to next week/days
  • onSwipePrev (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.

GitHub