0.0.4 • Published 1 year ago

react-native-calendar-date-range-picker v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-native-calendar-date-range-picker

React native calendar range picker Version

Preview

Getting Started

Installation

npm

npm i react-native-calendar-date-range-picker

Yarn

yarn add react-native-calendar-date-range-picker

Props

PropertyRequiredTypeDefaultDescription
onChangeCbNo(SelectedRangeType) => void() => voidFunction that gets triggered on any selection change
onDonePressedCbNo(SelectedRangeType) => void() => voidWhen done button is pressed
themeNoDayStyles{}styles for calendar/day components
monthHeightNoNumber300Approximate height for each month (along with days)
monthsCountNoNumber12Number of months starting from minDate
minDateNoMomentundefinedStarting date
initialSelectedRangeNoSelectedRangeType{startDate: moment(),endDate: moment().add(1, "day"),}initially selected range
useGestureHandlerNoBooleanfalseEnable if Flatlist should be imported from "react-native-gesture-handler"
renderWeekTextComponentNoJSX.ElementFunction that returns custom render for each week
renderMonthTextComponentNoJSX.ElementFunction that returns custom render for each month title
renderFooterComponentNoJSX.ElementFunction that returns custom render footer component

Types

DayStyles {
  unselectedContainerStyle?: ViewStyle;
  endContainerStyle?: ViewStyle;
  startingContainerStyle?: ViewStyle;
  startingWithEndContainerStyle?: ViewStyle;
  endingContainerStyle?: ViewStyle;
  betweenContainerStyle?: ViewStyle;
  disabledTextStyle?: TextStyle;
  emptyDay?: TextStyle;
  dayTextStyle?: TextStyle;
  selectedDayTextStyle?: TextStyle;
  startSelectedDayTextStyle?: TextStyle;
  endSelectedDayTextStyle?: TextStyle;
}
SelectedRangeType {
  startDate: Moment;
  endDate: Moment | null;
}