Skip to content

Commit

Permalink
fix minDate/maxDate fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg0 committed May 26, 2018
1 parent b6e92e4 commit 21862cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ class Calendar extends PureComponent {
}
renderMonthAndYear(focusedDate, changeShownDate, props) {
const { showMonthArrow, locale, minDate, maxDate, showMonthAndYearPickers } = props;
const upperYearLimit = maxDate.getFullYear();
const lowerYearLimit = minDate.getFullYear();
const upperYearLimit = (maxDate || Calendar.defaultProps.maxDate).getFullYear();
const lowerYearLimit = (minDate || Calendar.defaultProps.minDate).getFullYear();
const styles = this.styles;
return (
<div onMouseUp={e => e.stopPropagation()} className={styles.monthAndYearWrapper}>
Expand Down

0 comments on commit 21862cc

Please sign in to comment.