0.1.5 • Published 4 years ago

react-native-monthly v0.1.5

Weekly downloads
13
License
MIT
Repository
github
Last release
4 years ago

Animated and customizable monthly calendar for React Native

npm version npm Platform - Android and iOS License: MIT styled with prettier

Installation

Add the dependency:

npm i react-native-monthly

Peer Dependencies

"@freakycoder/react-native-bounceable": ">= 0.2.4",

Usage

Import

import RNMonthly from "react-native-monthly";

Fundamental Usage

<RNMonthly numberOfDays={31} activeDays={[1, 5, 6, 11, 21, 31]} />
<RNMonthly
  numberOfDays={30}
  activeBackgroundColor="green"
  inactiveBackgroundColor="#E6FFDE"
  activeDays={[1, 5, 6, 11, 21, 31]}
/>
<RNMonthly
  numberOfDays={28}
  activeBackgroundColor="#9C1818"
  inactiveBackgroundColor="#FFDEDE"
  activeDays={[1, 5, 6, 11, 21, 31]}
/>

Example Project 😍

You can checkout the example project 🥰

Simply run

  • npm i
  • react-native run-ios/android

should work of the example project.

Configuration - Props

Fundamentals

PropertyTypeDefaultDescription
numberOfDaysnumber31change days of the month it should be more than 28 and less than 31
activeDaysnumber[]undefinedset the active days
styleViewStyledefaultset or override the style object for the main container
todaynumberundefinedenable the today's selected item or any other

Customization (Optionals)

PropertyTypeDefaultDescription
activeBackgroundColorcolor"#49c1c2"change the active background color
inactiveBackgroundColorcolor"#f0f0f0"change the inactive background color
todayTextStyleTextStyledefaultset or override the style object for the today text style
itemContainerStyleViewStyledefaultset or override the style object for the each item container
onPressfunctionundefinedset your own logic for the button functionality when it is pressed

Future Plans

  • LICENSE
  • Today Feature
  • Write an article about the lib on Medium

Credits

Insipired on Martyna Zielińska

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Monthly is available under the MIT license. See the LICENSE file for more info.