1.1.1 • Published 6 years ago

thongdx-react-native-lunar-calendar v1.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

react-native-lunar-calendar

Known Vulnerabilities npm download

A lunar calendar component for react-native.

GitHub

Getting Started

$ npm install react-native-lunar-calendar --save
import Calender from "react-native-lunar-calendar";

...
render() {
  return (
    <Calendar
        headerStyle={{backgroundColor: '#f00'}}
        weekHeadStyle={{backgroundColor: '#00f'}}
        onDateSelect={(date) => console.log(date)}
        onMonthSelect={(mon) => console.log(mon)}
        dateStyle={{backgroundColor: '#f0f'}}
        selectDateStyle={{backgroundColor: '#f00'}}
        weekendStyle={{backgroundColor: '#fff'}}
        style={{backgroundColor: '#0f0'}} />
  )
}
...

API

  • style

    nametypedescription
    styleobjectstyle of main page
    weekHeadStyleobjectstyle of head of week show
    headerStyleobjectstyle of head of year show
    dateStyleobjectdate tab style
    selectDateStyleobjectstyle of date tab where selected
  • callback

    nametypedescription
    onDateSelectcallback function: (date) => {}the function will be called when select date on body
    onMonthSelectcallback function: (month) => {}the function will be called when select date on header

npm.io

npm.io