I want to create an calendar similar to airbnb and therefore I would like to be able to highlight the selected days in react big calendar.
I have found a similar question, but it doesn't really answer what I need:
How to select multiple days in react-big-calendar
I have tried using onSelectSlot, but it doesn't change the color for example.
<Calendar
selectable={true}
popup
localizer={localizer}
events={events}
startAccessor="start"
endAccessor="end"
components={{
dateCellWrapper: ColoredDateCellWrapper
}}
style={{
display: 'flex',
paddingTop: '20px',
height: '75vh',
}}
onSelectSlot={handleSlotSelection}
/>
const handleSlotSelection = ({ start, end, action }) => {
return { style: { backgroundColor: 'red' } };
};
Does anybody know how I could achieve this?