Tested with react-native 0.20
- Run
npm install react-native-sliding-calendar-view --save
var ScrollableCalendarView = require('react-native-sliding-calendar-view');
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});
}
}
See examples/SlidingCalendarViewExample.
selectedDay
(Date) - selectedDayonDaySelected
(callback) - on selected day
MIT Licensed