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.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
decreased by-3.4%
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:

var CalendarPicker = require('react-native-calendar-picker');
var Dimensions = require('Dimensions').get('window');

var Calendar = 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.width}
          selectedDayColor={"#ff6767"} // Optional
          scaleFactor={1.8} // Optional. Default scales to window width. />

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

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

Suggestions?

Drop an email to alves@stephanimoroni.com

Open issues

Submit PRs.

Special thanks

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

@edvinerikson

@brentvatne

Thanks you two :)

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