React-native-calendars: Changing selected borderRadius through custom theme doesn't work

Created on 16 Apr 2018  路  5Comments  路  Source: wix/react-native-calendars

Trying to change the borderRadius through the custom theme, but it seems that it doesn't work. But changing the backgroundColor seems to work. This is the code that I am using

'stylesheet.day.single': {
                           .....
                            selected: {
                                backgroundColor: colors.flamingo,
                                borderRadius: 2,
                            },
                        },
                      ......
Bug report

Most helpful comment

...
if (this.props.marking) {
      containerStyle.push({
        borderRadius: 17
      });
...

https://github.com/wix/react-native-calendars/blob/master/src/calendar/day/period/index.js#L129

This is the offending section! Is there a way I'm missing to overwrite containerStyle?

All 5 comments

...
if (this.props.marking) {
      containerStyle.push({
        borderRadius: 17
      });
...

https://github.com/wix/react-native-calendars/blob/master/src/calendar/day/period/index.js#L129

This is the offending section! Is there a way I'm missing to overwrite containerStyle?

Any update about this?

I have tried:

        markedDates={markedDates}
        markingType={'period'}
        theme={{
          'stylesheet.calendar.day.basic': {
            selected: {
              borderRadius: 0
            }
          }
        }}

But dont work

I forked it, so you can now change the borderRadius in the base property:

https://github.com/samiede/react-native-calendars

@samiede please open PR for this.

@enagorny Done! I honestly don't remember the changes I made because it's been so long ago, but it was only a few lines of code....

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matieux picture matieux  路  4Comments

nickitatkach picture nickitatkach  路  4Comments

MrAlekhin picture MrAlekhin  路  4Comments

ercpereda picture ercpereda  路  4Comments

kewin1807 picture kewin1807  路  4Comments