question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ExpandableCalendar issue with orientation

See original GitHub issue

Description

The Week Calendar in the Expandable Calendar is having trouble when the orientation is changed. I tried to fix it with stylings but it didn’t seem to affect it. The problem seems to be similar to this one: #606

Expected Behavior

I changed the orientation to landscape

Observed Behavior

image

Environment

Please run these commands in the project folder and fill in their results:

  • npm ls react-native-calendars: react-native-calendars@1.1260.0
  • npm ls react-native:
* +-- @react-native-clipboard/clipboard@1.7.0
| `-- react-native@0.64.1 deduped
+-- @react-native-community/geolocation@2.0.2
| `-- react-native@0.64.1 deduped
+-- @react-native-community/masked-view@0.1.11
| `-- react-native@0.64.1 deduped
+-- @react-native-picker/picker@1.16.0
| `-- react-native@0.64.1 deduped
+-- @react-navigation/native@5.9.4
| `-- react-native@0.64.1 deduped
+-- @react-navigation/stack@5.14.5
| +-- react-native-iphone-x-helper@1.3.1
| | `-- react-native@0.64.1 deduped
| `-- react-native@0.64.1 deduped
+-- @storybook/addon-ondevice-actions@5.3.23
| `-- react-native@0.64.1 deduped
+-- @storybook/addon-ondevice-knobs@5.3.25
| +-- @emotion/native@10.0.27
| | `-- react-native@0.64.1 deduped
| +-- react-native-modal-datetime-picker@7.6.1
| | `-- react-native-modal@11.10.0
| |   `-- react-native@0.64.1 deduped
| `-- react-native@0.64.1 deduped
+-- @storybook/react-native@5.3.25
| `-- react-native@0.64.1 deduped
+-- react-native-dev-menu@4.0.2
| `-- react-native@0.64.1 deduped
+-- react-native-draggable-flatlist@2.6.2
| `-- react-native@0.64.1 deduped
+-- react-native-elements@3.4.1
| +-- react-native-ratings@7.6.1
| | `-- react-native@0.64.1 deduped
| `-- react-native-size-matters@0.3.1
|   `-- react-native@0.64.1 deduped
+-- react-native-google-places-autocomplete@2.2.0
| `-- react-native@0.64.1 deduped
+-- react-native-keyboard-aware-scroll-view@0.9.4
| `-- react-native@0.64.1 deduped
+-- react-native-linear-gradient@2.5.6
| `-- react-native@0.64.1 deduped
+-- react-native-maps@0.28.0
| `-- react-native@0.64.1 deduped
+-- react-native-pager-view@5.1.8
| `-- react-native@0.64.1 deduped
+-- react-native-reanimated@2.1.0
| `-- react-native@0.64.1 deduped
+-- react-native-safe-area-context@3.2.0
| `-- react-native@0.64.1 deduped
+-- react-native-screens@3.2.0
| `-- react-native@0.64.1 deduped
+-- react-native-swipeable-item@1.5.7
| `-- react-native@0.64.1 deduped invalid
+-- react-native-tab-view@2.16.0
| `-- react-native@0.64.1 deduped
+-- react-native-track-player@1.2.7
| `-- react-native@0.64.1 deduped
+-- react-native-webview@11.4.5
| `-- react-native@0.64.1 deduped
`-- react-native@0.64.1
  `-- @react-native-community/cli@5.0.1-alpha.2
    `-- react-native@0.64.1 deduped

Also specify:

  1. Phone/emulator/simulator & version: Pixel 3a API 30 (Android 11)

Reproducible Demo

https://snack.expo.io/@kris_lau/schedule

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

1reaction
hoanganhle1996commented, Oct 8, 2021

data = useWindowDimensions() Adding key={orientation} to CalendarProvider Adding calendarWidth={data.width} to ExpandableCalendar It works for me

1reaction
scblasoncommented, Jun 18, 2021

I would add that is not just orientation issues. I have a tablet app with views like list and detail format (list at the left, detail of a selected element at right). I put an expandable calendar as a header of the list and when I expand it, it shows the calendar’s days format as it would be the entire width of the screen. There is a calculation there that assumes that is always shown in the entire width of the device I think, that breaks the component

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native android autorotate issue - Stack Overflow
I want my application should be fixed to portrait orientation. but when I enable the auto-rotate in mobile, ...
Read more >
Communication Modes and Literacy Education Archives | Page 20 ...
Expandable Calendar Boxes, Black ... These boxes help students who are nonverbal and have multiple disabilities learn what is going to happen next...
Read more >
SDSBVI > Programs > Outreach > Outreach Loan Library
Oregon Project / VI & B Preschool Children (Manual/Booklets) 3rd Edition ... Expandable Calendar Boxes - White, Communication / Literacy, Preschool - H...
Read more >
ScreenOrientation - Expo Documentation
On both iOS and Android platforms, changes to the screen orientation will override any ... An unknown error occurred when trying to get...
Read more >
A categorized directory of libraries and tools for Android
Callbacks are notified when strategies are complete, cancelled, or error out. ... Infinite cycle ViewPager with two-way orientation and interactive effect.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found