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

Multiple All Days Event Color not working #995

Open
omercandemir opened this issue Dec 22, 2023 · 2 comments
Open

Multiple All Days Event Color not working #995

omercandemir opened this issue Dec 22, 2023 · 2 comments

Comments

@omercandemir
Copy link

omercandemir commented Dec 22, 2023

In the allDaysEvents section, if the event covers more than one day completely, the custom event color is considered invalid and does not work.

<Calendar
               events={events}
                locale={'de'}
                date={currentDate}
                height={screenHeight}
                overlapOffset={30}
                onPressCell={pressCell}
                mode={'week'}
                onPressEvent={(e) => { clickEvent(e); }} 
                hourStyle={{fontSize: 14}}
                weekStartsOn={1}
                onChangeDate={(date) => {
                  setCurrentDate(date[0]);
                }}
                scrollOffsetMinutes={350}
                eventCellStyle={(event) => {
                  if (event.isGroup == 1) {
                    return ({ backgroundColor: '#303030' })
                  } else {
                    return ({backgroundColor: event.color})
                  }
                }}
              />

Simulator Screenshot - iPhone 15 - 2023-12-23 at 01 22 46

@acro5piano
Copy link
Owner

@omercandemir A happy new year! Sorry for my slow response. I'll leave my comments on the PR.

@acro5piano
Copy link
Owner

acro5piano commented Jan 7, 2024

For anyone who want to control the color, please use the theme functionality.

https://github.com/acro5piano/react-native-big-calendar?tab=readme-ov-file#theme

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

No branches or pull requests

2 participants