daySelectionAnimation is not applied while customDatesStyles defined
See original GitHub issueHi, I want to apply a custom date style for a date (eg: today) and it’s look like the day selection animation was overridden. I think the issue come from this block of code:
if (customStyle) {
dateNameStyle = [styles.dateName, customStyle.dateNameStyle];
dateNumberStyle = [styles.dateNumber, customStyle.dateNumberStyle];
dateViewStyle.push(customStyle.dateContainerStyle);
} else if (this.props.enabled) {
// Enabled state
//The user can disable animation, so that is why I use selection type
//If it is background, the user have to input colors for animation
//If it is border, the user has to input color for border animation
switch (this.props.daySelectionAnimation.type) {
case "background":
let dateViewBGColor = this.state.selected
? this.props.daySelectionAnimation.highlightColor
: "transparent";
dateViewStyle = { backgroundColor: dateViewBGColor };
break;
case "border":
let dateViewBorderWidth = this.state.selected
? this.props.daySelectionAnimation.borderWidth
: 0;
dateViewStyle = {
borderColor: this.props.daySelectionAnimation.borderHighlightColor,
borderWidth: dateViewBorderWidth
};
break;
default:
// No animation styling by default
break;
}
in CalendarDay.js
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
Why is <CalendarStrip /> not working properly? - Stack Overflow
I tried to console log and it seems the onDateSelected gets invoked only when I click on the selected date. How do I...
Read more >react-native-calendar-strip/README.md - UNPKG
To properly make a release build, import the appropriate "Locale" module using the following steps. Not importing the locale module will crash the...
Read more >react-native-calendar-strip - Bountysource
I get the following exception (screenshot attached) when I call updateWeekView in a non scrollable calendar strip. The numVisibleDays isn't defined in that...
Read more >react-native-calendar-strip .Easy to use and visually stunning ...
onDateSelected, Function to be used as a callback when a date is selected. ... render() { return ( <CalendarStrip customDatesStyles={customDatesStyles} .
Read more >Active questions tagged react-native+typescript - Stack Overflow
This library is working fine for iOS & Android but when I'm running it on Web. ... However, in Typescript it complains that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You’re right, the
customDatesStyles
prop bypasses the animation. I’ve found an alternative todaySelectionAnimation
is to useselectedDayStyle
. Adjusting your example:Do the parent components use
shouldComponentUpdate
? It could be that the parent ofCalendaerStrip
is stopping updates from flowing down. I’ve usedcustomDatesStyles
with dynamic data successfully before.