React native calendars are not rendering as expected with web build especially the custom day Component passed
See original GitHub issuePlease make our job easier by filling this template out to completion. If you’re requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections.
Description
I am using react-native-calendars for mobile & web app.When i start project on web its working as expected but when we create build its not showing any style
web::
web build::
react-app-rewired build

Have already updated the config-overide file:
babelInclude([
path.resolve(__dirname, 'node_modules/react-native-calendars'),
path.resolve(__dirname, 'node_modules/react-native-swipe-gestures'),
path.resolve(__dirname, 'src'),
])
```,
&&
…addBabelPlugins( ‘@babel/plugin-proposal-class-properties’, ‘@babel/plugin-transform-modules-commonjs’, ),
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:8
Top Results From Across the Web
Missing state prop in custom day component #1393
I tried implementing a custom day component to override the marking type in the calendar. I followed the documentation related to this, ...
Read more >react-native-calendar-picker
Calendar Picker Component for React Native. ... If the Chrome debugger is used during development, month shifting may be erratic due to a...
Read more >Invariant Violation: Objects are not valid as a React child
I was having this error and it turned out to be that I was unintentionally including an Object in my JSX code that...
Read more >Unit Testing in React: Full Guide on Jest and Enzyme Testing
Discover how to start and proceed with the testing of React components with Enzyme and Jest if you do not have enough experience...
Read more >5 Easy-to-Use React Native Calendar Libraries | by TC Davis
React Native Calendars does not support Expo Go. However, it can be used with EAS Build and custom clients. React Native Modal Datetime...
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
Version: 1.1264.0 Builder: NextJS
Hi,
I investigated this issue in package source code and I find issue with extractComponentProps (src/component-updater.js) function which is used in Calendar component (src/calendar/index.js) in renderHeader and renderDay methods.
The extractComponentProps function return empty object while component’s (first argument) propTypes are undefined. This empty object is distributed to Day or Header component’s properties so it not set up anything like theme, firstDay etc.
I fix it like this for my build:
I’d rather return copy of props than empty object in my case.
I hope this will help to fix the issue for web building.
Thanks.
This also worked for me, also using NextJS to build web version of our project. @sulaigor I’d suggest you make a PR with this code as a fix for this issue 👍