Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scroll issue #353

Open
amannarola opened this issue Jul 23, 2022 · 4 comments
Open

scroll issue #353

amannarola opened this issue Jul 23, 2022 · 4 comments

Comments

@amannarola
Copy link

ss4.mov

When I use dateBlackList,at that time scroll is not working otherwise it's working fine.Why this is happening.
Please give me solution for this issue

My code looks like:

<CalendarStrip
scrollable
scrollerPaging
dayComponentHeight={hp(8)}
key={key}
isEnglish
useIsoWeekday={true}
numDaysInWeek={7}
showWeekNumber
showEnglishLunar
selectedDate={date}
onDateSelected={changeDate}
datesBlacklist={datesBlacklistFunc}
disabledDateNameStyle={[styles.dateNameStyle, {
color: colors.cardSubText
}]}
disabledDateNumberStyle={[styles.dateNumberStyle, {
color: colors.cardText
}]}
onWeekChanged={(start, end) => {
setMonthYear(start)
}}
calendarHeaderStyle={{
display: 'none'
}}
style={[styles.style, {
backgroundColor: colors.navigationBackground,
}]}
innerStyle={[styles.innerStyle, {
backgroundColor: colors.cardBackground,
}]}
dayContainerStyle={[styles.dayContainerStyle, {
backgroundColor: 'transparent',
// right: wp(-2)
}]}
highlightDateContainerStyle={[styles.highlightDateContainerStyle, {
backgroundColor: colors.secondaryColor100,
// right: wp(-2)
}]}
updateWeek={true}
highlightDateNameStyle={[styles.highlightDateNameStyle, {
color: colors.selectedDayText
}]}
highlightDateNumberStyle={[styles.highlightDateNumberStyle, {
color: colors.selectedDateText
}]}
dateNameStyle={[styles.dateNameStyle, {
color: colors.cardSubText
}]}
dateNumberStyle={[styles.dateNumberStyle, {
color: colors.cardText
}]}
iconContainer={{
display: 'none'
}}
/>

@OlivierPapineau
Copy link

Exact same issue here. This package does not seem to still be maintained...

@peacechen
Copy link
Collaborator

Please submit a PR. Instructions to develop and debug this library locally:
https://github.com/BugiDev/react-native-calendar-strip#development-with-sample-application

@salmandayal
Copy link

Facing same issue here as well!

@thijs-qv
Copy link

thijs-qv commented Dec 7, 2023

I had the same issue but with markedDates instead of datesBlacklist. There's some comparisons being done of props in CalendarStrip componentDidUpdate:

    if (!this.compareDates(prevProps.startingDate, this.props.startingDate) ||
        !this.compareDates(prevProps.selectedDate, this.props.selectedDate) ||
        prevProps.datesBlacklist !== this.props.datesBlacklist ||
        prevProps.datesWhitelist !== this.props.datesWhitelist ||
        prevProps.markedDates  !== this.props.markedDates  ||
        prevProps.customDatesStyles !== this.props.customDatesStyles )
    {

Wrapping the markedDates prop in useMemo worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants