Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTL Support #36

Closed
xahmedtaha opened this issue Jan 13, 2021 · 7 comments
Closed

RTL Support #36

xahmedtaha opened this issue Jan 13, 2021 · 7 comments
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed needs more info Needs more information stale

Comments

@xahmedtaha
Copy link

Hello! Thanks for the awesome package.
do you plan on adding proper rtl support soon?
the selection indicator is flipped and and selection using mouse is reversed (if I click on 45 it chooses 15 and vice versa)
Screenshot from 2021-01-13 13-22-47

@RichardLindhout
Copy link
Member

Ah we should fix this. Could you maybe do a PR for this?

@RichardLindhout RichardLindhout added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Jan 18, 2021
@chakrihacker
Copy link
Contributor

Is there a spec on how it should look on RTL?

@asherguedalia
Copy link

Hi is there a suggestion yet how to fix this? I also ran into the same issue

@0had0
Copy link

0had0 commented Jun 10, 2022

inputContainer: {
-    flexDirection: 'row',
+    flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',
     alignItems: 'center',
   },

inside /node_modules/react-native-paper-dates/src/Time/TimePicker.tsx

#######################################

getMinuteNumbers(size: number, count: number) {
   return Array(12)
     .fill(true)
     .map(() => {
-      let x = Math.round(size / 2 + radius * Math.cos(angle))
+      let x = Math.round(I18nManager.isRTL ? size / 2 - radius * Math.cos(angle) :  size / 2 + radius * Math.cos(angle))

inside /node_modules/react-native-paper-dates/src/Time/DisplayModeContext.tsx

#######################################

getHourNumbers(
   return Array(arrayLength)
     .fill(true)
     .map(() => {
-      let x = Math.round(size / 2 + radius * Math.cos(angle))
+      let x = Math.round(I18nManager.isRTL ?  size / 2 - radius * Math.cos(angle) :  size / 2 + radius * Math.cos(angle))

inside /node_modules/react-native-paper-dates/src/Time/AnalogClockMinutes.tsx

@0had0
Copy link

0had0 commented Jun 10, 2022

don't forget to import I18nManager from react-native in each file

@iM-GeeKy iM-GeeKy added the needs more info Needs more information label Aug 23, 2024
Copy link
Contributor

Hey! Thanks for opening the issue. Can you provide more information about the issue? Please fill the issue template when opening the issue without deleting any section. We need all the information we can, to be able to help. Make sure to at least provide - Current behaviour, Expected behaviour, A way to reproduce the issue with minimal code (link to snack.expo.dev) or a repo on GitHub, and the information about your environment (such as the platform of the device, versions of all the packages etc.).

Copy link
Contributor

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed needs more info Needs more information stale
Projects
None yet
Development

No branches or pull requests

6 participants