From cc954f2ce246682dbb2dd5123d14dfe506b74b03 Mon Sep 17 00:00:00 2001 From: fiiv Date: Wed, 14 Jul 2021 03:57:16 +0000 Subject: [PATCH] Made changes suggested by @peacechen in https://github.com/BugiDev/react-native-calendar-strip/issues/303#issuecomment-879139810 --- src/CalendarStrip.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/CalendarStrip.js b/src/CalendarStrip.js index ea77401..4064262 100644 --- a/src/CalendarStrip.js +++ b/src/CalendarStrip.js @@ -146,7 +146,8 @@ class CalendarStrip extends Component { dayComponentWidth: 0, height: 0, monthFontSize: 0, - selectorSize: 0 + selectorSize: 0, + numVisibleDays: props.numDaysInWeek, }; this.animations = []; @@ -155,10 +156,6 @@ class CalendarStrip extends Component { //Receiving props and set date states, minimizing state updates. componentDidUpdate(prevProps, prevState) { - if (!this.state.dayComponentWidth) { - return - } - let startingDate = {}; let selectedDate = {}; let days = {};