BugiDev / react-native-calendar-strip

Easy to use and visually stunning calendar component for React Native.
MIT License
934 stars 325 forks source link

onWeekChanged callback receives wrong start and end dates during scrolling back #331

Open bars88 opened 2 years ago

bars88 commented 2 years ago

<CalendarStrip style={[styleUtils.flex1, styleUtils.ph6]} onWeekChanged={onWeekChanged} scrollable scrollerPaging selectedDate={selectedDate} leftSelector={[]} rightSelector={[]} showMonth={false} scrollToOnSetSelectedDate={false} upperCaseDays={false} dateNameStyle={{ fontFamily: 'SourceSansPro-Regular', fontSize: scale(14), marginBottom: scale(8), }} dateNumberStyle={{ fontFamily: 'SourceSansPro-Regular', fontSize: scale(14), fontWeight: '400' }} />

bars88 commented 2 years ago

when i scroll forward i'm getting correct period. if i scroll back start date seems start from Saturday

PunainenAurinko commented 2 years ago

I am also experiencing issues when scrolling back. The period start and end dates I'm getting in the onWeekChanged are off, and my date selection logic fails because of it.