0.4.11 • Published 1 year ago

react-cal-af v0.4.11

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

react-native-inline-calendar

React Native component that renders selectable monthly calendar or week stripe with agenda for selected date

Installation

Run in your terminal:

yarn add react-native-inline-calendar

or

npm install react-native-inline-calendar --save

Then add to your application as

import { Calendar } from react-native-inline-calendar

Usage

You can see usage example in this Expo demo

Params

Param nameTypeDefault valueDescription
weekModebooleanfalseenable week stripe mode
disableWeekTogglebooleanfalsedisable toggle from week stripe to month view
scrollablebooleanfalsescrollable or not
weekStartsOnnumber0Index of the first week day, i.e. 0 - Sunday, 1 - Monday, etc.
showAgendabooleantrueshow agenda list under the calendar (items property)
scrollByOnebooleantruescroll by one page or with momentum
animatedScrollTobooleantrueanimate initial scroll
hideHeaderbooleanfalseHide/show month header
hideWeekDaysbooleanfalseHide/show week days names
showArrowsbooleantrueHide/show navigation arrows
minMonthsToScrollnumber0number of months in the past available for scroll
maxMonthsToScrollnumber1number of months in the future available for scroll
initialDatedatenew Dateinitial date
minDatedatenew Dateif set, all dates earlier than that will be disabled
headerDateFormatstringDate format for header
selectedDatedateinitialDate or nowdate, initially selected
currentDatedateinitialDate or nowcurrent date
itemsobjectnullagenda items in map format (see below)
dataUpdatedtimestampnulltimestamp of last data refresh to update calendar cache. Required for dinamic data updates
emptyListRendererfunctiondefaultEmptyListRendererwhat should be rendered if agenda is empty for selected date
itemRendererfunctiondefaultItemRendereragenda item renderer
itemClickHandlerfunctionvoidagenda item click handler
onDateSelectfunctionvoiddate select handler, doesn't prevent rendering date's agenda, runs after selected date state is updated
stylesobjectdefaultStylescustom styles that can be applied to the component. Import defaultStyles for the reference

Agenda items data format:

{
  'YYYY-MM-DD': {
    style: object,
    items: [ object ] 
  } 
} 
0.4.11

1 year ago

0.4.10

1 year ago

0.4.9

1 year ago

0.4.8

1 year ago

0.4.7

2 years ago

0.4.6

2 years ago