react-daypicker
Advanced tools
Comparing version 0.0.6 to 1.0.0
@@ -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 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
111041
404
2