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

react-daypicker

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-daypicker - npm Package Compare versions

Comparing version 0.0.6 to 1.0.0

16

lib/DayPicker.js

@@ -38,4 +38,7 @@ 'use strict';

_this.previousMonth = function () {
var month = _this.month.subtract(1, 'month');
_this.setState({
month: _this.month.subtract(1, 'month')
month: month,
keyPrefix: month.format('YYYY.MM')
});

@@ -45,4 +48,7 @@ };

_this.nextMonth = function () {
var month = _this.month.add(1, 'month');
_this.setState({
month: _this.month.add(1, 'month')
month: month,
keyPrefix: month.format('YYYY.MM')
});

@@ -54,2 +60,3 @@ };

var day = _this.month.date(dayOfMonth);
_this.props.onDayClick(day);

@@ -243,6 +250,3 @@ };

get: function get() {
var month = this.state.month;
return month.clone();
return this.state.month.clone();
}

@@ -249,0 +253,0 @@ }]);

{
"name": "react-daypicker",
"version": "0.0.6",
"version": "1.0.0",
"description": "A simple datepicker inspired by Pikaday.",

@@ -5,0 +5,0 @@ "main": "lib/DayPicker.js",

@@ -43,10 +43,11 @@ import React from 'react';

get month() {
const { month } = this.state;
return month.clone();
return this.state.month.clone();
}
previousMonth = () => {
const month = this.month.subtract(1, 'month');
this.setState({
month: this.month.subtract(1, 'month'),
month,
keyPrefix: month.format('YYYY.MM'),
});

@@ -56,4 +57,7 @@ }

nextMonth = () => {
const month = this.month.add(1, 'month');
this.setState({
month: this.month.add(1, 'month'),
month,
keyPrefix: month.format('YYYY.MM'),
});

@@ -65,2 +69,3 @@ }

const day = this.month.date(dayOfMonth);
this.props.onDayClick(day);

@@ -67,0 +72,0 @@ }

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