Skip to content

Commit

Permalink
MaxDate now slectable in next month Fixes wojtekmaj#485
Browse files Browse the repository at this point in the history
  • Loading branch information
wordysumo committed Mar 24, 2021
1 parent 929d0b7 commit 48c9c7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/Calendar/Navigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,11 @@ export default function Navigation({
return minDate && minDate >= previousActiveEndDate;
})();

const nextButtonDisabled = maxDate && maxDate <= nextActiveStartDate;

const nextButtonDisabled = maxDate && maxDate < nextActiveStartDate;
const next2ButtonDisabled = (
shouldShowPrevNext2Buttons
&& maxDate
&& maxDate <= nextActiveStartDate2
&& maxDate < nextActiveStartDate2
);

function onClickPrevious() {
Expand Down
2 changes: 1 addition & 1 deletion src/TileGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ TileGroup.propTypes = {
...tileGroupProps,
activeStartDate: PropTypes.instanceOf(Date),
count: PropTypes.number,
dateType: PropTypes.string,
dateTransform: PropTypes.func.isRequired,
dateType: PropTypes.string,
offset: PropTypes.number,
step: PropTypes.number,
tile: PropTypes.func.isRequired,
Expand Down

0 comments on commit 48c9c7d

Please # to comment.