react-native-lunar-calendar
v1.1.1
Published
A lunar calendar component for react-native.
Downloads
34
Readme
react-native-lunar-calendar
A lunar calendar component for react-native.
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
| name | type | description | | --------------- | ------ | -------------------------------- | | style | object | style of main page | | weekHeadStyle | object | style of head of week show | | headerStyle | object | style of head of year show | | dateStyle | object | date tab style | | selectDateStyle | object | style of date tab where selected |
callback
| name | type | description | | ------------- | -------------------------------- | ---------------------------------------- | | onDateSelect | callback function: (date) => {} | the function will be called when select date on body | | onMonthSelect | callback function: (month) => {} | the function will be called when select date on header |