From 48c9c7dd238e6e7d9ecc2957c9de4d57852856a6 Mon Sep 17 00:00:00 2001 From: Jack Rathbone Date: Wed, 24 Mar 2021 12:09:56 +0000 Subject: [PATCH] MaxDate now slectable in next month Fixes #485 --- src/Calendar/Navigation.jsx | 5 ++--- src/TileGroup.jsx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Calendar/Navigation.jsx b/src/Calendar/Navigation.jsx index 26369f07..0bb31f6a 100644 --- a/src/Calendar/Navigation.jsx +++ b/src/Calendar/Navigation.jsx @@ -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() { diff --git a/src/TileGroup.jsx b/src/TileGroup.jsx index ee60004e..824e2077 100644 --- a/src/TileGroup.jsx +++ b/src/TileGroup.jsx @@ -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,