acro5piano / react-native-big-calendar

gcal/outlook like calendar component for React Native
https://react-native-big-calendar.vercel.app
MIT License
422 stars 138 forks source link

fix: schedule mode color issue of the item. #970

Closed charithAmila closed 8 months ago

charithAmila commented 8 months ago

Fixed the issue: https://github.com/acro5piano/react-native-big-calendar/issues/965

Test: Try to change the background color of the event like below.

<Calendar
  height={SCREEN_HEIGHT}
  events={state.events}
  mode="schedule"
  eventCellStyle={(event: ICalendarEventBase & { color?: string }) => {
    if (event.color) {
      return [{ backgroundColor: event.color }]
    }
    return []
  }}
/>

Result:

Simulator Screen Shot - iPhone 8 - 2023-11-08 at 00 18 33

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-big-calendar ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2023 5:31am
acro5piano commented 8 months ago

@charithAmila Thanks! It looks fine!