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 #6 from appfolio/cpAddDateToOnViewCallback
Browse files Browse the repository at this point in the history
Add date to on view callback
  • Loading branch information
JingyuZ authored Jun 19, 2017
2 parents 9229b67 + bb43d20 commit 37f1539
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,10 @@ class Calendar extends React.Component {
};

handleViewChange = (view) => {
if (view !== this.props.view && isValidView(view, this.props))
this.props.onView(view)
if (view !== this.props.view && isValidView(view, this.props)) {
const currentDate = this.props.date;
this.props.onView(view, currentDate)
}
};

handleSelectEvent = (...args) => {
Expand Down

0 comments on commit 37f1539

Please sign in to comment.