From 204dc69f6bfac85e574c90e0c45626f18fda7bff Mon Sep 17 00:00:00 2001 From: Evan McPeters Date: Thu, 20 May 2021 10:26:44 -0700 Subject: [PATCH 1/2] 0.30.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index bd18c593d..41892f885 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@appfolio/react-big-calendar-apm", - "version": "0.29.0", + "version": "0.30.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9c8bcc521..c4e35365d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@appfolio/react-big-calendar-apm", - "version": "0.29.0", + "version": "0.30.0", "description": "Calendar! with events", "author": "Jason Quense ", "repository": "https://github.com/appfolio/react-big-calendar.git", From 519a4652ffee7bb98ddea739001887a44025bf34 Mon Sep 17 00:00:00 2001 From: Evan McPeters Date: Mon, 12 Jul 2021 06:45:05 -0700 Subject: [PATCH 2/2] Add callback for ondaymore call --- src/DateContentRow.js | 4 ++-- src/Month.js | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/DateContentRow.js b/src/DateContentRow.js index 18d55feea..466852d29 100644 --- a/src/DateContentRow.js +++ b/src/DateContentRow.js @@ -75,8 +75,8 @@ class DateContentRow extends React.Component { //Clear handle seclect slot click timeout clearTimeout(this._selectTimer); //If onDayMore passed, ignore handle show more - if(onDayMore && view == 'day') { - onDayMore(); + if(onDayMore) { + onDayMore(range[0], view); return false; } diff --git a/src/Month.js b/src/Month.js index 68e8263d6..7da945a2a 100644 --- a/src/Month.js +++ b/src/Month.js @@ -57,6 +57,8 @@ let propTypes = { onShowMore: PropTypes.func, onDrillDown: PropTypes.func, getDrilldownView: PropTypes.func.isRequired, + onDayMore: PropTypes.func, + selectedView: PropTypes.string, dateFormat, @@ -298,10 +300,16 @@ class MonthView extends React.Component { } handleShowMore = (events, date, cell, slot) => { - const { popup, onDrillDown, onShowMore, getDrilldownView } = this.props + const { popup, onDrillDown, onShowMore, getDrilldownView, onDayMore, selectedView } = this.props //cancel any pending selections so only the event click goes through. this.clearSelection() + //Will this work + if (onDayMore) { + onDayMore(date, selectedView); + return false; + } + if (popup) { let position = getPosition(cell, findDOMNode(this))