react-day-picker
Advanced tools
Comparing version 0.8.0 to 0.8.1
/* global jest, describe, it, expect */ | ||
jest.dontMock('../src/utils'); | ||
jest.dontMock('../src/CalendarUtils'); | ||
jest.dontMock('moment'); | ||
import { weeks } from '../src/CalendarUtils'; | ||
import moment from 'moment'; | ||
describe('weeks', function() { | ||
import { weeks } from '../src/utils'; | ||
import moment from 'moment'; | ||
it('counts the right days for jan 2015', function() { | ||
@@ -37,2 +37,2 @@ const day = moment('2015-01-01', 'YYYY-MM-DD'); | ||
}); | ||
}); |
@@ -72,2 +72,3 @@ 'use strict'; | ||
e.persist(); | ||
var month = this.state.month; | ||
@@ -87,2 +88,3 @@ | ||
e.persist(); | ||
var month = this.state.month; | ||
@@ -241,2 +243,5 @@ | ||
var modifiers = this.getModifiersForDay(day); | ||
if (outside) { | ||
modifiers.push('outside'); | ||
} | ||
className += modifiers.map(function (mod) { | ||
@@ -243,0 +248,0 @@ return ' DayPicker-day--' + mod; |
module.exports = { | ||
entry: './src/jsx/main.jsx', | ||
entry: './src/client', | ||
@@ -9,3 +9,3 @@ output: { | ||
}, | ||
resolve: { extensions: ['', '.js'] }, | ||
@@ -15,3 +15,3 @@ | ||
loaders: [ | ||
{ test: /\.jsx?$/, exclude: /node_modules/, loaders: ['babel-loader'] }, | ||
{ test: /\.js$/, exclude: /node_modules/, loaders: ['babel-loader'] }, | ||
{ test: /\.scss?$/, loaders: ['style', 'css', 'autoprefixer-loader?browsers=last 2 version', 'sass-loader'] }, | ||
@@ -22,2 +22,2 @@ { test: /\.svg$/, loader: "url-loader?limit=100000&mimetype=image/svg+xml" } | ||
devtool: 'source-map' | ||
}; | ||
}; |
{ | ||
"name": "react-day-picker", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "Minimalistic date picker component for React and momentjs.", | ||
@@ -39,13 +39,13 @@ "main": "./dist/DayPicker.js", | ||
"autoprefixer-loader": "^1.2.0", | ||
"babel": "^5.1.9", | ||
"babel-core": "^5.1.9", | ||
"babel": "^5.1.10", | ||
"babel-core": "^5.1.10", | ||
"babel-jest": "^5.0.1", | ||
"babel-loader": "^5.0.0", | ||
"css-loader": "^0.9.1", | ||
"css-loader": "^0.10.1", | ||
"jest-cli": "^0.4.0", | ||
"react-tap-event-plugin": "git+https://github.com/gpbl/react-tap-event-plugin.git", | ||
"sass-loader": "0.4.2", | ||
"style-loader": "^0.9.0", | ||
"style-loader": "^0.10.2", | ||
"url-loader": "^0.5.5", | ||
"webpack": "^1.8.4", | ||
"webpack": "^1.8.5", | ||
"webpack-dev-server": "^1.8.0" | ||
@@ -52,0 +52,0 @@ }, |
@@ -25,3 +25,3 @@ # react-day-picker | ||
You need to setup your own CSS. You can start from [this css](example/src/scss/daypicker.scss) as example. | ||
You need to setup your own CSS. You can start from [this css](example/src/style/DayPicker.scss) as example. | ||
@@ -28,0 +28,0 @@ ## Usage examples |
@@ -70,2 +70,3 @@ import React, { Component, PropTypes } from 'react'; | ||
handleNextMonthClick(e) { | ||
e.persist(); | ||
const { month } = this.state; | ||
@@ -81,2 +82,3 @@ const nextMonth = month.clone().add(1, 'month'); | ||
handlePrevMonthClick(e) { | ||
e.persist(); | ||
const { month } = this.state; | ||
@@ -212,3 +214,6 @@ const prevMonth = month.clone().subtract(1, 'month'); | ||
else { | ||
const modifiers = this.getModifiersForDay(day); | ||
let modifiers = this.getModifiersForDay(day); | ||
if (outside) { | ||
modifiers.push('outside'); | ||
} | ||
className += modifiers.map(mod => ` DayPicker-day--${mod}`).join(''); | ||
@@ -215,0 +220,0 @@ return ( |
Sorry, the diff of this file is not supported yet
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
1945
418723