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

react-calendar

Package Overview
Dependencies
Maintainers
3
Versions
88
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.1.0 to 2.2.0

7

build/Calendar.js

@@ -21,2 +21,6 @@ 'use strict';

var _mergeClassNames = require('merge-class-names');
var _mergeClassNames2 = _interopRequireDefault(_mergeClassNames);
var _Navigation = require('./Calendar/Navigation');

@@ -388,3 +392,3 @@

'div',
{ className: 'react-calendar' },
{ className: (0, _mergeClassNames2.default)('react-calendar', this.props.className) },
this.renderNavigation(),

@@ -443,2 +447,3 @@ this.renderContent()

calendarType: _propTypes3.isCalendarType,
className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.arrayOf(_propTypes2.default.string)]),
locale: _propTypes2.default.string,

@@ -445,0 +450,0 @@ maxDate: _propTypes3.isMaxDate,

3

package.json
{
"name": "react-calendar",
"version": "2.1.0",
"version": "2.2.0",
"description": "A component for picking dates or date periods for your React application.",

@@ -38,2 +38,3 @@ "main": "build/entry.js",

"lodash.once": "^4.1.1",
"merge-class-names": "^1.1.0",
"prop-types": ">=15.5",

@@ -40,0 +41,0 @@ "react": ">=15.5",

@@ -86,3 +86,4 @@ ![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

|calendarType|Defines which type of calendar should be used. Can be "US" or "ISO 8601". Defaults to "US" for "en-US" locale, "ISO 8601" to all the others.|`"ISO 8601"`|
|locale|Defines which locale should be used by the calendar. Can be any BCP 47 language tag. Defaults to user's browser settings.|`"hu-HU"`|
|className|Defines class name(s) that will be added along with "react-calendar" to the main React-Calendar `<div>` element.|<ul><li>String: `"class1 class2"`</li><li>Array of strings: `["class1", "class2 class3"]`</li></ul>|
|locale|Defines which locale should be used by the calendar. Can be any [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag). Defaults to user's browser settings.|`"hu-HU"`|
|maxDate|Defines maximum date that the user can select. Periods partially overlapped by maxDate will also be selectable, although react-calendar will ensure that no later date is selected.|Date: `new Date()`|

@@ -102,3 +103,3 @@ |maxDetail|Defines the most detailed view that the user shall see. View defined here also becomes the one on which clicking an item will select a date and pass it to onChange. Can be "month", "year", "decade" or "century". Defaults to "month".|`"month"`|

|renderChildren|Allows to render custom content within a given item (day on month view, month on year view and so on).|`({ date, view }) => view === 'month' && date.getDay() === 0 ? <p>It's Sunday!</p> : null`|
|returnValue|Defines which dates shall be passed by the calendar to the onChange function and onClick{Period} functions. Can be "start", "end" or "range". The latter will cause an array with start and end values to be passed. Defaults to "start".|`"range"`|
|returnValue|Defines which dates shall be passed by the calendar to the onChange function and onClick{Period} functions. Can be "start", "end" or "range". The latter will cause an array with start and end values to be passed. Defaults to "start".|`"range"`|
|showNavigation|Defines whether a navigation bar with arrows and title shall be rendered. Defaults to true.|`false`|

@@ -105,0 +106,0 @@ |showNeighboringMonth|Defines whether days from previous or next month shall be rendered if the month doesn't start on the first day of the week or doesn't end on the last day of the week, respectively. Defaults to true.|`false`|

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import mergeClassNames from 'merge-class-names';

@@ -322,3 +323,3 @@ import Navigation from './Calendar/Navigation';

return (
<div className="react-calendar">
<div className={mergeClassNames('react-calendar', this.props.className)}>
{this.renderNavigation()}

@@ -342,2 +343,6 @@ {this.renderContent()}

calendarType: isCalendarType,
className: PropTypes.oneOfType([
PropTypes.string,
PropTypes.arrayOf(PropTypes.string),
]),
locale: PropTypes.string,

@@ -344,0 +349,0 @@ maxDate: isMaxDate,

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