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

react-native-calendar-picker

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-calendar-picker

Calendar Picker Component for React Native

  • 2.6.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
decreased by-4.18%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-calendar-picker

Calendar Picker Component for React Native

This is a Calendar Picker Component for React Native alt tag

To use the calendar you just need to:

npm install react-native-calendar-picker

How to use it:

import React, { Component } from 'react';
import {
  AppRegistry,
  Dimensions,
  StyleSheet,
  Text,
  View
} from 'react-native';

var CalendarPicker = require('react-native-calendar-picker'),
    CalendarPicker2;

CalendarPicker2 = React.createClass({
  getInitialState: function() {
    return {
      date: new Date(),
    };
  },

  onDateChange: function(date) {
    this.setState({ date: date });
  },

  render: function() {
    return (
      <View style={styles.container}>

        <CalendarPicker 
          selectedDate={this.state.date}
          onDateChange={this.onDateChange}
          screenWidth={Dimensions.get('window')}
          selectedBackgroundColor={'#5ce600'} />

        <Text style={styles.selectedDate}> Date: { this.state.date.toString() } </Text>
      </View>
    );
  }
});

const styles = StyleSheet.create({
  container: {
    marginTop: 30,
  },
  selectedDate: {
    backgroundColor: 'rgba(0,0,0,0)',
    color: '#000',
  }
});

CalendarPicker props

PropTypeDescription
weekdaysarrayList of week days. Eg. ['Mo', 'Tue', ...] Must be 7 days
monthsarrayList of months names.
startFromMondaybooleanDefault first day of week will be Sunday. You can set start of week from Monday.
previousTitlestringTitle of button for previous month.
nextTitlestringTitle of button for next month.
selectedDayColorstringColor for selected day
scaleFactorfloatOptional. Default scales to window width

To Do:

  • Add swipe gestures
  • Add ability to select date range

Suggestions?

Drop an email to alves@stephanimoroni.com

Open issues

Submit PRs.

Special thanks

I would like to call out some contributors who have been helping with this project

@edvinerikson @thomaswright @brentvatne @kesha-antonov @jthestupidkid @adamkrell @joshuapinter

Keywords

FAQs

Package last updated on 10 May 2016

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