BugiDev / BugiDev/react-native-calendar-strip

Scrollable w/ RTL not rendering properly in Android

Open
#216 20 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
976
Forks
336
PR merge metrics
No merged PRs in 30d

Description

Hey,
I have an issue to render Day names/number in android,
It works very well on iOS!

iOS screenshot

![Screen Shot 2020-07-30 at 1 24 16 AM](https://user-images.githubusercontent.com/24620979/88861208-27f18d80-d206-11ea-8796-d1030d6a3ae4.png)

Android screenshot

![Screen Shot 2020-07-30 at 1 24 28 AM](https://user-images.githubusercontent.com/24620979/88861175-17411780-d206-11ea-9563-6250605bbdf2.png)

**dependencies**

> "moment": "^2.27.0",
> "react": "16.13.1",
> "react-native": "0.63.0",
> "react-native-calendar-strip": "^2.0.8",
>

**what I tried:**
-

- delete node_modules
- reset cache
- set local as default 'en'
- change styles
- delete the app then reinstall it.

Nothing works!
here's my code snippet

CalendarStrip.js

```
import React from 'react';
import {View, Text, TouchableOpacity, StyleSheet} from 'react-native';
import CalendarStrip from 'react-native-calendar-strip';
import {locale} from '../utils/local';
import Feather from 'react-native-vector-icons/Feather';

const StripeCalender = (props) => {
const [dateName, setDateName] = React.useState('');

const onDateSelected = (date) => {
setDateName(date.format('D MMMM YYYY'));
};

const closeModal = () => {
props.closeModal();
};
return (

}
leftSelector={}
locale={locale}
/>
Selected Date: {dateName}


);
};

export default StripeCalender;

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#eee',
},
});

```

index.js

```
...

import 'moment';
import 'moment/locale/ar';

```
locale.js

```
export const locale = {
name: 'ar',
config: {
months: [
'يناير',
'فبراير',
'مارس',
'أبريل',
'مايو',
'يونيو',
'يوليو',
'أغسطس',
'سبتمبر',
'أكتوبر',
'نوفمبر',
'ديسمبر',
],
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split(''),
weekdaysShort: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split(
'_',
),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'D/\u200FM/\u200FYYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm',
},
},
};

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.