react-native-micro-calendar

0.2.2 • Public • Published

react-native-micro-calendar

Tested with react-native 0.55

Add it to your project

  1. Run npm install react-native-micro-calendar --save
  2. var ScrollableCalendarView = require('react-native-micro-calendar');

Demo

Basic usage

import SlidingCalendarView from 'react-native-micro-calendar';
 
class SlidingCalendarViewExample extends React.Component {
 
  constructor(props) {
    super(props);
    this.state = {
      selectedDay: new Date(),
    }
  }
 
  render() {
    return <View style={styles.container}>
      <SlidingCalendarView
        selectedDay={this.state.selectedDay}
        onDaySelected={this.onDaySelected.bind(this)}
      >
        <View style={styles.content}>
          <Text>Past here your content</Text>
        </View>
      </SlidingCalendarView>
    </View>
  }
 
  onDaySelected(day) {
    this.setState({selectedDay: day});
  }
}
 
## Example
 
See
[examples/SlidingCalendarViewExample](https://github.com/derskeal/react-native-micro-calendar/tree/master/examples/SlidingCalendarViewExample)
 
## Props
 
- **`selectedDay`** _(Date)- selectedDay
- **`onDaySelected`**  _(callback)- on selected day
---
 
**MIT Licensed**

Package Sidebar

Install

npm i react-native-micro-calendar

Weekly Downloads

3

Version

0.2.2

License

MIT

Unpacked Size

24.9 kB

Total Files

7

Last publish

Collaborators

  • derskeal