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

Can't change the flatlist backgroundColor of Agenda with calendarBackground in theme #2000

Closed
Jinho1011 opened this issue Aug 24, 2022 · 8 comments
Labels

Comments

@Jinho1011
Copy link

Description

  • renderCalendarList in agenda does not pass theme to CalendarList, because extractCalendarListProps does not extract theme from props. Due to this problem, even though calendarBackground is set, the backgroundColor of CalendarList inside Agenda cannot be changed.

Expected Behavior

  • extractCalendarListProps should extract theme from props.
@Jinho1011 Jinho1011 changed the title Cannot change Flatlist backgroundColor in Agenda Can't change the flatlist backgroundColor of Agenda with calendarBackground in theme Aug 24, 2022
@kyleder
Copy link

kyleder commented Aug 24, 2022

I'm seeing this same behavior after upgrading to RN 0.68.2 (was previously on 0.61.5).

@Jinho1011
Copy link
Author

downgrade to 1.1286.0 fixed this

@JSimai
Copy link

JSimai commented Aug 25, 2022

I'm using RN 0.64.3, and downgrading to version 1.1286.0 of react-native-calendars didn't fix the issue for me. The latest version of RNC also broke other theme attributes. With this setup, just the background colour isn't working.

Screen Shot 2022-08-25 at 7 32 42 pm

@tsalama
Copy link

tsalama commented Aug 25, 2022

Same issue here after updating to RN 0.68. Also the CalendarList theme isn't honored.

@dpdenton
Copy link

Looking at https://github.com/wix/react-native-calendars/blob/master/src/agenda/style.ts#L56 adding the below worked for me (the

<Agenda
    theme={{
      'stylesheet.agenda.main': {
        reservations: {
          backgroundColor: 'red',
        },
      }}
     ...
 />

@wallacerenan
Copy link

wallacerenan commented Nov 28, 2022

<Agenda
        showClosingKnob
        renderItem={RenderItem}
        items={{
          '2022-11-28': [
            {
              name: 'Renan',
              day: new Date().toISOString().split('T')[0],
              height: 50,
            },
          ],
        }}
        theme={{
          reservationsBackgroundColor: '#fff',
        }}
      />

reservationsBackgroundColor is not typed, use this.

need to fix, Theme interface doesn't export this key

@stale
Copy link

stale bot commented Mar 11, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@pridemusvaire
Copy link
Contributor

I have posted a PR for this , PR here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants