BugiDev / react-native-calendar-strip

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

daySelectionAnimation applying border to all days #268

Closed sperardt closed 3 years ago

sperardt commented 3 years ago

Hi there,

I am following your examples on the components documentation. When I run the code for having a border around the selected day, all of days of such week get the border.

 <View>
                    <CalendarStrip
                        calendarAnimation={{type: 'sequence', duration: 30}}
                        daySelectionAnimation={{type:'border', duration: 200, borderWidth: 1, borderHighlightColor: 'white'}}
                        style={{height: 100, paddingTop: 20, paddingBottom: 10}}
                        calendarHeaderStyle={{color: 'white'}}
                        calendarColor={'#7743CE'}
                        dateNumberStyle={{color: 'white'}}
                        dateNameStyle={{color: 'white'}}
                        highlightDateNumberStyle={{color: 'yellow'}}
                        highlightDateNameStyle={{color: 'yellow'}}
                        disabledDateNameStyle={{color: 'grey'}}
                        disabledDateNumberStyle={{color: 'grey'}}
                        iconContainer={{flex: 0.1}}
                    />
                </View>

I also have added the prop 'selectedDate' but no difference on the result. Am I missing something?

Screen Shot 2021-02-04 at 12 06 53 PM Screen Shot 2021-02-04 at 12 07 55 PM
peacechen commented 3 years ago

That looks like a bug. Would you try reverting to 2.1.5 ?

sperardt commented 3 years ago

Hi @peacechen , same result using 2.1.5

peacechen commented 3 years ago

How about 2.1.4 or earlier? Would help to know which version broke it

sperardt commented 3 years ago

Hi @peacechen,

I have been downgraded to other versions and noticed I missed one step when downgrading to 2.1.5. Tested it again and 2.1.5 works as expected. Sorry about that.

Cheers,

peacechen commented 3 years ago

A fix has been published 2.1.7. Please confirm whether that version works.

sperardt commented 3 years ago

hey @peacechen ,

Apparently, it didn't work and versions 2.1.4, 2.1.5, 2.1.6 are marking all dates with border today.

peacechen commented 3 years ago

I tested 2.1.7 in the sample project in this repo using the <CalendarStrip> props you provided. You may need to delete node_modules to ensure that you're getting the latest version.

Try the sample project in this repo: https://github.com/BugiDev/react-native-calendar-strip#development-with-sample-application

sperardt commented 3 years ago

looks like I had them cached. Deleted node_modules, cleaned the cache and installed all dependencies again.

2.1.7 is working fine.

Thanks!