From 2e87431f3c20b7cb04b887f62aa3d2efe6ebeb2f Mon Sep 17 00:00:00 2001 From: mertsincan Date: Mon, 8 Jul 2019 14:42:07 +0300 Subject: [PATCH] Fixed #956 - calendar shows a redundant week on the calendar --- src/components/calendar/Calendar.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/calendar/Calendar.js b/src/components/calendar/Calendar.js index f100749601..024ed76bfa 100644 --- a/src/components/calendar/Calendar.js +++ b/src/components/calendar/Calendar.js @@ -942,8 +942,9 @@ export class Calendar extends Component { let dayNo = 1; let today = new Date(); let weekNumbers = []; + let monthRows = Math.ceil((daysLength + firstDay) / 7); - for(let i = 0; i < 6; i++) { + for(let i = 0; i < monthRows; i++) { let week = []; if(i === 0) {