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", 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))