Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit ee4b9ba

Browse files
authored
Merge pull request #36 from appfolio/em-add-ondaymore-callback
Em add ondaymore callback
2 parents daf3535 + 519a465 commit ee4b9ba

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@appfolio/react-big-calendar-apm",
3-
"version": "0.29.0",
3+
"version": "0.30.0",
44
"description": "Calendar! with events",
55
"author": "Jason Quense <[email protected]>",
66
"repository": "https://github.com/appfolio/react-big-calendar.git",

src/DateContentRow.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ class DateContentRow extends React.Component {
7575
//Clear handle seclect slot click timeout
7676
clearTimeout(this._selectTimer);
7777
//If onDayMore passed, ignore handle show more
78-
if(onDayMore && view == 'day') {
79-
onDayMore();
78+
if(onDayMore) {
79+
onDayMore(range[0], view);
8080
return false;
8181
}
8282

src/Month.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ let propTypes = {
5757
onShowMore: PropTypes.func,
5858
onDrillDown: PropTypes.func,
5959
getDrilldownView: PropTypes.func.isRequired,
60+
onDayMore: PropTypes.func,
61+
selectedView: PropTypes.string,
6062

6163
dateFormat,
6264

@@ -298,10 +300,16 @@ class MonthView extends React.Component {
298300
}
299301

300302
handleShowMore = (events, date, cell, slot) => {
301-
const { popup, onDrillDown, onShowMore, getDrilldownView } = this.props
303+
const { popup, onDrillDown, onShowMore, getDrilldownView, onDayMore, selectedView } = this.props
302304
//cancel any pending selections so only the event click goes through.
303305
this.clearSelection()
304306

307+
//Will this work
308+
if (onDayMore) {
309+
onDayMore(date, selectedView);
310+
return false;
311+
}
312+
305313
if (popup) {
306314
let position = getPosition(cell, findDOMNode(this))
307315

0 commit comments

Comments
 (0)