Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rn-calendar-view

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-calendar-view

Simple Calendar Component for React Native

  • 0.0.7
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

RN-Calendar-View

Simple Calendar based Date picker for react native.

Installation
npm i -s rn-calendar-view
Props
PropTypeRequiredDefault ValueDescription
primaryColorStringNo#FAFAFAPrimary Color for buttons, dates
primaryTextColorStringNo#333333Primary Text Color for buttons, dates
secondaryColorStringNo#000AAAColor for buttons, dates on active state
secondaryTextColorStringNo#FFFFFFText Color for buttons, dates on active state
onDateChangeFunctionYesN/ACall Back Function on selecting a date
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

Keywords

FAQs

Package last updated on 01 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc