Skip to content

Latest commit

 

History

History
56 lines (44 loc) · 1.42 KB

README.md

File metadata and controls

56 lines (44 loc) · 1.42 KB

NOTE: Currently I am building this library. Feel free to install the demo app from from examples folder and check the component for yourself.

react-native-swipe-calendar

Horizontal swiping calendar component for your react native app.

Installation steps

Install from the NPM respository using yarn or npm

Installing using npm

npm install react-native-swipe-calendar

Installing using Yarn

yarn add react-native-swipe-calendar

Inspiration

The following library is an inspiration from the library react-natve-horizontal-calendar.

Motivation

The existing library was missing a few components like integration with redux and an external calendar component to change month, date and year.

Usage

import CalendarStrip from 'react-native-swipe-calendar';

class Demo extends Component {

  state = {
    currentDate: new moment(),
    currentDateIndex: null
  };

  onSelectDate = (date: Moment) => {
    Alert.alert('date Selected is', date);
  };
  
  render() {
    return (
      <View>
        <CalendarStrip
        currentDate={currentDate}
        showDaysAfterCurrent={30}
        onSelectDate={this.onSelectDate}
        width={responsiveWidth(90)}
        />
      </View>
    )
   }
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.