Skip to content

Commit

Permalink
Pass isVisible to renderMonthElement
Browse files Browse the repository at this point in the history
  • Loading branch information
gidztech committed Apr 6, 2019
1 parent bc5c736 commit db54efd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -173,7 +173,7 @@ numberOfMonths: PropTypes.number,
keepOpenOnDateSelect: PropTypes.bool,
reopenPickerOnClearDates: PropTypes.bool,
renderCalendarInfo: PropTypes.func,
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'), PropTypes.func, // ({ month, onMonthSelect, onYearSelect }) => PropTypes.node,
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'), PropTypes.func, // ({ month, onMonthSelect, onYearSelect, isVisible }) => PropTypes.node,
hideKeyboardShortcutsPanel: PropTypes.bool,

// navigation related props
Expand Down Expand Up @@ -254,7 +254,7 @@ numberOfMonths: PropTypes.number,
keepOpenOnDateSelect: PropTypes.bool,
reopenPickerOnClearDate: PropTypes.bool,
renderCalendarInfo: PropTypes.func,
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'), // ({ month, onMonthSelect, onYearSelect }) => PropTypes.node,
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'), // ({ month, onMonthSelect, onYearSelect, isVisible }) => PropTypes.node,
hideKeyboardShortcutsPanel: PropTypes.bool,
daySize: nonNegativeInteger,
isRTL: PropTypes.bool,
Expand Down Expand Up @@ -308,7 +308,7 @@ The following is a list of other *OPTIONAL* props you may provide to the `DayPic
withPortal: PropTypes.bool,
initialVisibleMonth: PropTypes.func,
renderCalendarInfo: PropTypes.func,
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'), // ({ month, onMonthSelect, onYearSelect }) => PropTypes.node,
renderMonthElement: mutuallyExclusiveProps(PropTypes.func, 'renderMonthText', 'renderMonthElement'), // ({ month, onMonthSelect, onYearSelect, isVisible }) => PropTypes.node,
onOutsideClick: PropTypes.func,
keepOpenOnDateSelect: PropTypes.bool,
noBorder: PropTypes.bool,
Expand Down
4 changes: 3 additions & 1 deletion src/components/CalendarMonth.jsx
Expand Up @@ -197,7 +197,9 @@ class CalendarMonth extends React.PureComponent {
)}
>
{renderMonthElement ? (
renderMonthElement({ month, onMonthSelect, onYearSelect })
renderMonthElement({
month, onMonthSelect, onYearSelect, isVisible,
})
) : (
<strong>
{monthTitle}
Expand Down

0 comments on commit db54efd

Please sign in to comment.