Closed safwentrabelsi closed 3 years ago
Im using react-native with expo and I just noticed I have this same issue on android. I need some quick fixing for school project. When I select a date it disappears but then if I select another the previous one is visible again.
I even set the following props in case the default highlight was white, but it did not work. My calendar background color is white. highlightDateNameStyle={'black'} highlightDateNumberStyle={'black'}
Date disappear when selected on android
<CalendarStrip scrollable style={styles.calendar} showMonth={false} calendarColor={'#FFFFFF'} calendarHeaderStyle={{color: 'black'}} dateNumberStyle={{color: 'black'}} dateNameStyle={{color: 'black'}} iconContainer={{flex: 0.1}} daySelectionAnimation={{ type: 'background', highlightColor: '#d3d3d3', }} selectedDate={selectedDate} onDateSelected={this.onDateSelected} markedDates={date => { if (date.dayOfYear() === moment().dayOfYear()) { return { dots: [ { color: 'black', }, ], }; } }} />
i have a same problem
Im using react-native with expo and I just noticed I have this same issue on android. I need some quick fixing for school project. When I select a date it disappears but then if I select another the previous one is visible again.
I even set the following props in case the default highlight was white, but it did not work. My calendar background color is white. highlightDateNameStyle={'black'} highlightDateNumberStyle={'black'}
Well for some reason I just tried this again and it work. If your calendar color is white make sure to set a highlightDateNameStyle color. Try their expo snack and you can see it works on android. They have blue background and yellow on highlightDateNameStyle. Hope is not something that sometimes work and sometimes doesnt
Im using react-native with expo and I just noticed I have this same issue on android. I need some quick fixing for school project. When I select a date it disappears but then if I select another the previous one is visible again. I even set the following props in case the default highlight was white, but it did not work. My calendar background color is white. highlightDateNameStyle={'black'} highlightDateNumberStyle={'black'}
Well for some reason I just tried this again and it work. If your calendar color is white make sure to set a highlightDateNameStyle color. Try their expo snack and you can see it works on android. They have blue background and yellow on highlightDateNameStyle. Hope is not something that sometimes work and sometimes doesnt
still it's not working , when i select date then it will disappear whether it's white color or any other color.
@gaurav0044 any solutions?
The example project in this repo uses Expo and date selection works properly. Check that your code is updating its local state correctly. https://github.com/BugiDev/react-native-calendar-strip/tree/master/example
Instructions to get the example running: https://github.com/BugiDev/react-native-calendar-strip#development-with-sample-application
@gaurav0044 any solutions? try adding this so that date changes back to original color once it is unselected dateNameStyle={{color: 'black'}} dateNumberStyle={{color: 'black'}}
Date disappear when selected on android