1.0.1 • Published 2 years ago

react-native-lunar-calendario v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

React Native Lunar Calendar 📆

This repo fork from React Native Calendar{https://www.npmjs.com/package/react-native-calendario}

Installation

npm install react-native-lunar-calendario --save

Using yarn

yarn add react-native-lunar-calendario

Usage

import { Calendar } from 'react-native-lunar-calendario';
<Calendar
  onChange={(range) => console.log(range)}
  range={[new Date(2018, 3, 30), new Date(2018, 4, 5)]}
  minDate={new Date(2018, 3, 20)}
  theme={{
    activeDayColor: {},
    monthTitleTextStyle: {
      color: '#6d95da',
      fontWeight: '300',
      fontSize: 16,
    },
    emptyMonthContainerStyle: {},
    emptyMonthTextStyle: {
      fontWeight: '200',
    },
    weekColumnsContainerStyle: {},
    weekColumnStyle: {
      paddingVertical: 10,
    },
    weekColumnTextStyle: {
      color: '#b6c1cd',
      fontSize: 13,
    },
    nonTouchableDayContainerStyle: {},
    nonTouchableDayTextStyle: {},
    startDateContainerStyle: {},
    endDateContainerStyle: {},
    dayContainerStyle: {},
    dayTextStyle: {
      color: '#2d4150',
      fontWeight: '200',
      fontSize: 15,
    },
    dayOutOfRangeContainerStyle: {},
    dayOutOfRangeTextStyle: {},
    todayContainerStyle: {},
    todayTextStyle: {
      color: '#6d95da',
    },
    activeDayContainerStyle: {
      backgroundColor: '#6d95da',
    },
    activeDayTextStyle: {
      color: 'white',
    },
    nonTouchableLastMonthDayTextStyle: {},
  }}
/>

API

PropDescriptionRequired?DefaultType
onChange (deprecated)Callback called when a day is pressed.noFunction
onPressCallback called when a day is pressed.yes(Date) => void
minDateMinimum date that can be selected.nonullDate
maxDateMaximum date that can be selected.nonullDate
rangeSelected range dateyesnullDate
themeCalendar StyleSheetnonullThemeType
localeCalendar languagees, en, fr, br'en'LocaleType
dayNamesArray of day namesno[]string[]
monthNamesArray of names of each mono[]string[]
showWeekdaysShow Week columnsnotrueboolean
showMonthTitleShow Month titlenotrueboolean
initialListSizeFlatList initialNumToRenderno2number
startingMonthFirst month to rendernocurrent month'YYYY-MM-DD'
numberOfMonthsNumber of months to renderno12number
disableRangeTurn off range date selectionnofalseboolean
firstDayMondayMonday as first day of the weeknofalseboolean
monthHeightChange Month row heightno370number
markedDaysMulti-dot support on Day componentnoundefinedMarkedDays
disabledDaysDisabled daysnonull{string: any }
renderDayContentRender custom Day contentnonullFunction
renderAllMonthsUse this for web, render all monthsnonullboolean
viewableItemsChangedhandleViewableItemsChange callbacknonullFunction
disableOffsetDaysRemove offset Days.nofalseboolean

License

MIT