Today I used patch-package to patch react-native-calendars@1.22.0 for the project I'm working on.
After upgrading to Expo SDK 52 with Bridgeless mode. All the calendars were broken
Warning: TypeError: Cannot read property 'style' of undefined
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-calendars/src/agenda/index.js b/node_modules/react-native-calendars/src/agenda/index.js
index 8451908..3aad17a 100644
--- a/node_modules/react-native-calendars/src/agenda/index.js
+++ b/node_modules/react-native-calendars/src/agenda/index.js
@@ -28,7 +28,7 @@ export default class AgendaView extends Component {
theme: PropTypes.object,
// agenda container style
- style: viewPropTypes.style,
+ style: PropTypes.style,
// the list of items that have to be displayed in agenda. If you want to render item as empty date
// the value of date key has to be an empty array []. If there exists no value for date key it is
diff --git a/node_modules/react-native-calendars/src/calendar/index.js b/node_modules/react-native-calendars/src/calendar/index.js
index 61b7a21..a2ead8d 100644
--- a/node_modules/react-native-calendars/src/calendar/index.js
+++ b/node_modules/react-native-calendars/src/calendar/index.js
@@ -30,7 +30,7 @@ class Calendar extends Component {
markedDates: PropTypes.object,
// Specify style for calendar container element. Default = {}
- style: viewPropTypes.style,
+ style: PropTypes.style,
// Initially visible month. Default = Date()
current: PropTypes.any,
// Minimum date that can be selected, dates before minDate will be grayed out. Default = undefined
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
react-native-calendars@1.22.0
for the project I'm working on.After upgrading to Expo SDK 52 with Bridgeless mode. All the calendars were broken
Warning: TypeError: Cannot read property 'style' of undefined
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.