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

Commit

Permalink
Merge pull request #36 from appfolio/em-add-ondaymore-callback
Browse files Browse the repository at this point in the history
Em add ondaymore callback
  • Loading branch information
emcpete authored Jul 12, 2021
2 parents daf3535 + 519a465 commit ee4b9ba
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <monastic.panic@gmail.com>",
"repository": "https://github.com/appfolio/react-big-calendar.git",
Expand Down
4 changes: 2 additions & 2 deletions src/DateContentRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
10 changes: 9 additions & 1 deletion src/Month.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ let propTypes = {
onShowMore: PropTypes.func,
onDrillDown: PropTypes.func,
getDrilldownView: PropTypes.func.isRequired,
onDayMore: PropTypes.func,
selectedView: PropTypes.string,

dateFormat,

Expand Down Expand Up @@ -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))

Expand Down

0 comments on commit ee4b9ba

Please sign in to comment.