Socket
Socket
Sign inDemoInstall

react-calendar

Package Overview
Dependencies
Maintainers
3
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-calendar - npm Package Compare versions

Comparing version 2.8.0 to 2.9.0

dist/Calendar.css

14

package.json
{
"name": "react-calendar",
"version": "2.8.0",
"version": "2.9.0",
"description": "A component for picking dates or date periods for your React application.",
"main": "build/entry.js",
"main": "dist/entry.js",
"types": "./index.d.ts",

@@ -10,3 +10,3 @@ "es6": "src/entry.js",

"build": "npm run build-js && npm run build-styles && npm run copy-styles",
"build-js": "babel src -d build --ignore **/__tests__",
"build-js": "babel src -d dist --ignore **/__tests__",
"build-styles": "lessc ./src/Calendar.less ./src/Calendar.css",

@@ -22,3 +22,2 @@ "copy-styles": "node ./copy-styles.js",

"setupFiles": [
"<rootDir>/jest.shim.js",
"<rootDir>/jest.setup.js"

@@ -64,3 +63,3 @@ ],

"babel-plugin-transform-object-assign": "^6.22.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",

@@ -76,3 +75,4 @@ "babel-preset-stage-2": "^6.24.1",

"eslint-plugin-react": "^7.5.1",
"jest": "^21.2.1",
"jest": "^22.0.4",
"jest-cli": "^22.0.4",
"less": "^2.7.3",

@@ -85,3 +85,3 @@ "react-test-renderer": "^16.2.0"

"index.d.ts",
"build/",
"dist/",
"src/"

@@ -88,0 +88,0 @@ ],

@@ -74,3 +74,3 @@ ![downloads](https://img.shields.io/npm/dt/react-calendar.svg) ![build](https://img.shields.io/travis/wojtekmaj/react-calendar.svg) ![dependencies](https://img.shields.io/david/wojtekmaj/react-calendar.svg

If you don't want to use default React-Calendar styling to build upon it, you can import React-Calendar by using `import Calendar from 'react-calendar/build/entry.nostyle';` instead.
If you don't want to use default React-Calendar styling to build upon it, you can import React-Calendar by using `import Calendar from 'react-calendar/dist/entry.nostyle';` instead.

@@ -77,0 +77,0 @@ ## User guide

@@ -22,3 +22,3 @@ import React from 'react';

expect(navigation.length).toBe(1);
expect(navigation).toHaveLength(1);
});

@@ -33,3 +33,3 @@

expect(monthView.length).toBe(1);
expect(monthView).toHaveLength(1);
});

@@ -44,3 +44,3 @@

expect(yearView.length).toBe(1);
expect(yearView).toHaveLength(1);
});

@@ -58,3 +58,3 @@

expect(yearView.length).toBe(1);
expect(yearView).toHaveLength(1);
});

@@ -75,3 +75,3 @@

expect(yearView.length).toBe(1);
expect(yearView).toHaveLength(1);
});

@@ -92,3 +92,3 @@

expect(yearView.length).toBe(1);
expect(yearView).toHaveLength(1);
});

@@ -103,3 +103,3 @@

expect(monthView.length).toBe(1);
expect(monthView).toHaveLength(1);
expect(component.state().view).toBe('month');

@@ -118,3 +118,3 @@ });

expect(monthView.length).toBe(1);
expect(monthView).toHaveLength(1);
expect(component.state().view).toBe('month');

@@ -130,3 +130,3 @@ });

expect(yearView.length).toBe(1);
expect(yearView).toHaveLength(1);
expect(component.state().view).toBe('year');

@@ -142,3 +142,3 @@ });

expect(decadeView.length).toBe(1);
expect(decadeView).toHaveLength(1);
expect(component.state().view).toBe('decade');

@@ -154,3 +154,3 @@ });

expect(centuryView.length).toBe(1);
expect(centuryView).toHaveLength(1);
expect(component.state().view).toBe('century');

@@ -170,3 +170,3 @@ });

const firstDayTile = monthView.find('.react-calendar__tile').first();
const firstDayTileTimeISO = firstDayTile.find('time').props().dateTime;
const firstDayTileTimeISO = firstDayTile.find('time').prop('dateTime');

@@ -187,3 +187,3 @@ expect(firstDayTileTimeISO).toBe(getISOLocalDate(value) + midnightTimestamp);

const firstDayTile = monthView.find('.react-calendar__tile').first();
const firstDayTileTimeISO = firstDayTile.find('time').props().dateTime;
const firstDayTileTimeISO = firstDayTile.find('time').prop('dateTime');

@@ -202,3 +202,3 @@ expect(firstDayTileTimeISO).toBe(getISOLocalDate(activeStartDate) + midnightTimestamp);

const firstDayTile = monthView.find('.react-calendar__tile').first();
const firstDayTileTimeISO = firstDayTile.find('time').props().dateTime;
const firstDayTileTimeISO = firstDayTile.find('time').prop('dateTime');

@@ -205,0 +205,0 @@ expect(firstDayTileTimeISO).toBe(getISOLocalDate(beginOfCurrentMonth) + midnightTimestamp);

@@ -21,3 +21,3 @@ import React from 'react';

const firstDayTile = component.find('.react-calendar__tile').first();
const firstDayTileTimeISO = firstDayTile.find('time').props().dateTime;
const firstDayTileTimeISO = firstDayTile.find('time').prop('dateTime');

@@ -39,3 +39,3 @@ expect(firstDayTileTimeISO).toBe(activeStartDate.getFullYear() + midnightTimestamp);

const firstDayTile = component.find('.react-calendar__tile').first();
const firstDayTileClassName = firstDayTile.props().className;
const firstDayTileClassName = firstDayTile.prop('className');

@@ -65,5 +65,5 @@ expect(firstDayTileClassName.includes(tileClassName)).toBe(true);

const firstDayTile = tiles.first();
const firstDayTileClassName = firstDayTile.props().className;
const firstDayTileClassName = firstDayTile.prop('className');
const secondDayTile = tiles.at(1);
const secondDayTileClassName = secondDayTile.props().className;
const secondDayTileClassName = secondDayTile.prop('className');

@@ -70,0 +70,0 @@ expect(firstDayTileClassName.includes('firstDayOfTheMonth')).toBe(true);

@@ -21,3 +21,3 @@ import React from 'react';

const firstDayTile = component.find('.react-calendar__tile').first();
const firstDayTileTimeISO = firstDayTile.find('time').props().dateTime;
const firstDayTileTimeISO = firstDayTile.find('time').prop('dateTime');

@@ -39,3 +39,3 @@ expect(firstDayTileTimeISO).toBe(activeStartDate.getFullYear() + midnightTimestamp);

const firstDayTile = component.find('.react-calendar__tile').first();
const firstDayTileClassName = firstDayTile.props().className;
const firstDayTileClassName = firstDayTile.prop('className');

@@ -65,5 +65,5 @@ expect(firstDayTileClassName.includes(tileClassName)).toBe(true);

const firstDayTile = tiles.first();
const firstDayTileClassName = firstDayTile.props().className;
const firstDayTileClassName = firstDayTile.prop('className');
const secondDayTile = tiles.at(1);
const secondDayTileClassName = secondDayTile.props().className;
const secondDayTileClassName = secondDayTile.prop('className');

@@ -70,0 +70,0 @@ expect(firstDayTileClassName.includes('firstDayOfTheMonth')).toBe(true);

@@ -18,4 +18,4 @@ import React from 'react';

expect(noWrapComponent.props().style.display).toBe('flex');
expect(noWrapComponent.props().style.flexWrap).toBe('no-wrap');
expect(noWrapComponent.prop('style').display).toBe('flex');
expect(noWrapComponent.prop('style').flexWrap).toBe('no-wrap');
});

@@ -32,4 +32,4 @@

expect(wrapComponent.props().style.display).toBe('flex');
expect(wrapComponent.props().style.flexWrap).toBe('wrap');
expect(wrapComponent.prop('style').display).toBe('flex');
expect(wrapComponent.prop('style').flexWrap).toBe('wrap');
});

@@ -48,3 +48,3 @@

expect(children.length).toBe(3);
expect(children).toHaveLength(3);
expect(children.at(0).text()).toBe('Hey');

@@ -65,8 +65,8 @@ expect(children.at(1).text()).toBe('Hi');

children.forEach(child => expect(child.props().style.display).toBe('flex'));
children.forEach(child => expect(child.prop('style').display).toBe('flex'));
children.forEach(child =>
expect(parseFloat(child.props().style.flexBasis)).toBeCloseTo(33.33)
expect(parseFloat(child.prop('style').flexBasis)).toBeCloseTo(33.33)
);
expect(parseFloat(children.first().props().style.marginLeft)).toBeCloseTo(33.33);
expect(parseFloat(children.first().prop('style').marginLeft)).toBeCloseTo(33.33);
});
});

@@ -24,3 +24,3 @@ import React from 'react';

const firstDayTile = component.find('.react-calendar__tile').first();
const firstDayTileTimeISO = firstDayTile.find('time').props().dateTime;
const firstDayTileTimeISO = firstDayTile.find('time').prop('dateTime');

@@ -42,3 +42,3 @@ expect(firstDayTileTimeISO).toBe(getISOLocalDate(activeStartDate) + midnightTimestamp);

const firstDayTile = component.find('.react-calendar__tile').first();
const firstDayTileClassName = firstDayTile.props().className;
const firstDayTileClassName = firstDayTile.prop('className');

@@ -68,5 +68,5 @@ expect(firstDayTileClassName.includes(tileClassName)).toBe(true);

const firstDayTile = tiles.first();
const firstDayTileClassName = firstDayTile.props().className;
const firstDayTileClassName = firstDayTile.prop('className');
const secondDayTile = tiles.at(1);
const secondDayTileClassName = secondDayTile.props().className;
const secondDayTileClassName = secondDayTile.prop('className');

@@ -73,0 +73,0 @@ expect(firstDayTileClassName.includes('firstDayOfTheMonth')).toBe(true);

@@ -24,3 +24,3 @@ import React from 'react';

const firstDayTile = component.find('.react-calendar__tile').first();
const firstDayTileTimeISO = firstDayTile.find('time').props().dateTime;
const firstDayTileTimeISO = firstDayTile.find('time').prop('dateTime');

@@ -42,3 +42,3 @@ expect(firstDayTileTimeISO).toBe(getISOLocalMonth(activeStartDate) + midnightTimestamp);

const firstDayTile = component.find('.react-calendar__tile').first();
const firstDayTileClassName = firstDayTile.props().className;
const firstDayTileClassName = firstDayTile.prop('className');

@@ -68,5 +68,5 @@ expect(firstDayTileClassName.includes(tileClassName)).toBe(true);

const firstDayTile = tiles.first();
const firstDayTileClassName = firstDayTile.props().className;
const firstDayTileClassName = firstDayTile.prop('className');
const secondDayTile = tiles.at(1);
const secondDayTileClassName = secondDayTile.props().className;
const secondDayTileClassName = secondDayTile.prop('className');

@@ -73,0 +73,0 @@ expect(firstDayTileClassName.includes('firstDayOfTheMonth')).toBe(true);

@@ -26,3 +26,3 @@ import React from 'react';

expect(children.length).toBe(5);
expect(children).toHaveLength(5);
expect(prev2.type).toBe('button');

@@ -50,3 +50,3 @@ expect(prev.type).toBe('button');

expect(children.length).toBe(3);
expect(children).toHaveLength(3);
expect(prev.type).toBe('button');

@@ -371,3 +371,3 @@ expect(drillUp.type).toBe('button');

expect(button.props().disabled).toBe(true);
expect(button.prop('disabled')).toBe(true);
});

@@ -392,4 +392,4 @@

expect(prev2.props().disabled).toBe(true);
expect(prev.props().disabled).toBe(true);
expect(prev2.prop('disabled')).toBe(true);
expect(prev.prop('disabled')).toBe(true);
});

@@ -414,4 +414,4 @@

expect(next.props().disabled).toBe(true);
expect(next2.props().disabled).toBe(true);
expect(next.prop('disabled')).toBe(true);
expect(next2.prop('disabled')).toBe(true);
});

@@ -435,5 +435,5 @@

expect(prev2.props().disabled).toBe(true);
expect(prev.props().disabled).toBe(true);
expect(prev2.prop('disabled')).toBe(true);
expect(prev.prop('disabled')).toBe(true);
});
});

@@ -19,3 +19,3 @@ import React from 'react';

expect(children.length).toBe(5);
expect(children).toHaveLength(5);
expect(children.first().text()).toBe('1');

@@ -34,3 +34,3 @@ });

expect(children.length).toBe(6);
expect(children).toHaveLength(6);
expect(children.first().text()).toBe('52');

@@ -49,3 +49,3 @@ });

expect(children.length).toBe(5);
expect(children).toHaveLength(5);
expect(children.first().text()).toBe('53');

@@ -64,3 +64,3 @@ });

expect(children.length).toBe(5);
expect(children).toHaveLength(5);
expect(children.first().text()).toBe('1');

@@ -79,3 +79,3 @@ });

expect(children.length).toBe(6);
expect(children).toHaveLength(6);
});

@@ -94,3 +94,3 @@

expect(children.length).toBe(6);
expect(children).toHaveLength(6);
});

@@ -97,0 +97,0 @@

@@ -198,3 +198,3 @@ import {

expect(centuryRange.length).toBe(2);
expect(centuryRange).toHaveLength(2);
expect(centuryRange[0].toISOString()).toBe(beginOfCenturyDate.toISOString());

@@ -284,3 +284,3 @@ expect(centuryRange[1].toISOString()).toBe(endOfCenturyDate.toISOString());

expect(decadeRange.length).toBe(2);
expect(decadeRange).toHaveLength(2);
expect(decadeRange[0].toISOString()).toBe(beginOfDecadeDate.toISOString());

@@ -354,3 +354,3 @@ expect(decadeRange[1].toISOString()).toBe(endOfDecadeDate.toISOString());

expect(yearRange.length).toBe(2);
expect(yearRange).toHaveLength(2);
expect(yearRange[0].toISOString()).toBe(beginOfYearDate.toISOString());

@@ -453,3 +453,3 @@ expect(yearRange[1].toISOString()).toBe(endOfYearDate.toISOString());

expect(monthRange.length).toBe(2);
expect(monthRange).toHaveLength(2);
expect(monthRange[0].toISOString()).toBe(beginOfMonthDate.toISOString());

@@ -523,3 +523,3 @@ expect(monthRange[1].toISOString()).toBe(endOfMonthDate.toISOString());

expect(dayRange.length).toBe(2);
expect(dayRange).toHaveLength(2);
expect(dayRange[0].toISOString()).toBe(beginOfDayDate.toISOString());

@@ -668,3 +668,3 @@ expect(dayRange[1].toISOString()).toBe(endOfDayDate.toISOString());

expect(centuryRange.length).toBe(2);
expect(centuryRange).toHaveLength(2);
expect(centuryRange[0].toISOString()).toBe(beginOfCenturyDate.toISOString());

@@ -681,3 +681,3 @@ expect(centuryRange[1].toISOString()).toBe(endOfCenturyDate.toISOString());

expect(decadeRange.length).toBe(2);
expect(decadeRange).toHaveLength(2);
expect(decadeRange[0].toISOString()).toBe(beginOfDecadeDate.toISOString());

@@ -694,3 +694,3 @@ expect(decadeRange[1].toISOString()).toBe(endOfDecadeDate.toISOString());

expect(yearRange.length).toBe(2);
expect(yearRange).toHaveLength(2);
expect(yearRange[0].toISOString()).toBe(beginOfYearDate.toISOString());

@@ -707,3 +707,3 @@ expect(yearRange[1].toISOString()).toBe(endOfYearDate.toISOString());

expect(monthRange.length).toBe(2);
expect(monthRange).toHaveLength(2);
expect(monthRange[0].toISOString()).toBe(beginOfMonthDate.toISOString());

@@ -720,3 +720,3 @@ expect(monthRange[1].toISOString()).toBe(endOfMonthDate.toISOString());

expect(dayRange.length).toBe(2);
expect(dayRange).toHaveLength(2);
expect(dayRange[0].toISOString()).toBe(beginOfDayDate.toISOString());

@@ -723,0 +723,0 @@ expect(dayRange[1].toISOString()).toBe(endOfDayDate.toISOString());

@@ -10,3 +10,3 @@ import { getRange } from './dates';

export const mergeFunctions = (...functions) => (...args) =>
functions.filter(f => f).forEach(f => f(...args));
functions.filter(Boolean).forEach(f => f(...args));

@@ -13,0 +13,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