0.0.7 • Published 5 years ago

rn-calendar-view v0.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

RN-Calendar-View

Simple Calendar based Date picker for react native.

Installation

npm i -s rn-calendar-view

Props

Example

import React from 'react';
import {
  StatusBar,
  SafeAreaView,
  Text,
  ScrollView,
  StyleSheet,
  Alert
} from 'react-native';
import { Calendar } from 'rn-calendar-view';

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
  scrollContainer: {
    flex: 1,
    alignItems: 'center',
    padding: 20,
  },
  title: {
    textAlign: 'center',
    fontWeight: 'bold',
    margin: 20,
  },
});

const App = () => {
  return (
    <>
      <StatusBar barStyle="dark-content" />
      <SafeAreaView style={styles.container}>
        <ScrollView contentContainerStyle={styles.scrollContainer}>
          <Text style={styles.title}>Date Picker</Text>
          <Calendar
            onDateChange={obj => Alert.alert('You have picked', `${obj.date}-${obj.month}-${obj.year}`)}
          />
        </ScrollView>
      </SafeAreaView>
    </>
  );
};

export default App;
Output
0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago