react-native-big-calendar icon indicating copy to clipboard operation
react-native-big-calendar copied to clipboard

Multiple All Days Event Color not working

Open omercandemir opened this issue 1 year ago • 2 comments

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

omercandemir avatar Dec 22 '23 22:12 omercandemir

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

acro5piano avatar Jan 07 '24 06:01 acro5piano

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

acro5piano avatar Jan 07 '24 06:01 acro5piano