Skip to main content
MonthList renders months stacked vertically in one continuous, virtualized scroll: a month-title separator followed by each month’s grid, under a single fixed weekday header. Each month shows only its own days (no dimmed adjacent-month fill), and sizes to its own row count. It’s the home for date picking. It takes the same selection props as MonthView and renders a range band that flows continuously across month boundaries, which the horizontally-paged month view can’t do. An events-free picker needs nothing but date and the selection wiring:
import { MonthList, useDateRange } from "react-native-super-calendar";

function RangePicker() {
  const [date, setDate] = useState(new Date());
  const { range, onPressDate, selectRange } = useDateRange({ minDate: new Date() });

  return (
    <MonthList
      date={date}
      weekStartsOn={1}
      selectedRange={range ?? undefined}
      minDate={new Date()}
      onPressDay={onPressDate}
      onSelectDrag={selectRange}
      onChangeVisibleMonth={setDate}
    />
  );
}
Tap two days to set the range ends, or long-press and drag to sweep one out (the list auto-scrolls at the edges so a range can span months). Pass events (plus an optional renderEvent) to show events in the grids too; it reuses MonthView, so events, selection, and disabled days behave as in the month view.

Props

PropTypeNotes
dateDateThe month scrolled to on mount.
weekStartsOn0–6First day of the week.
eventsCalendarEvent<T>[]Optional; omit for an events-free picker.
weekRowHeightnumberHeight of each week row (px). Default 56.
monthHeaderHeightnumberTitle-row height (px). Default 44. A custom header must fit it.
renderEventRenderEvent<T>Optional; defaults to DefaultEvent.
keyExtractor(event, index) => stringOptional; defaults to start-time + index.
selectedDatesDate[]Selected days (see Selection).
selectedRangeDateRangeSelected span.
minDate / maxDateDateBound the selectable range.
isDateDisabled(date) => booleanDisable specific days.
onSelectDrag(start, end) => voidDrag-to-select; pair with useDateRange().selectRange.
showAdjacentMonthsbooleanShow dimmed adjacent-month days. Default false.
onPressDay(date) => voidTap a day cell.
onChangeVisibleMonth(month) => voidFires with the topmost month once it’s ~60% visible.
renderMonthHeader(month) => ReactNodeReplace the default LLLL yyyy title.