0.1.3 • Published 8 years ago

react-native-sliding-calendar-view v0.1.3

Weekly downloads
36
License
MIT
Repository
-
Last release
8 years ago

react-native-sliding-calendar-view

Tested with react-native 0.20

Add it to your project

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

Demo

Basic usage

import SlidingCalendarView from 'react-native-sliding-calendar-view';

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.

Props

  • selectedDay (Date) - selectedDay
  • onDaySelected (callback) - on selected day

MIT Licensed