0

For now I'm storing my events only in the state of the component. That's the function I'm using to add events to my state

const handleSelect = ({ start, end }) => {
     setEventsList([...eventsList, {
            start,
            end,
            id: 90,
            title: 'New Event',
            color: 'red',
            desc: 'Some des...',
     }]);
}

When the state is updated and the event is plotted on the calendar, it ends 1 day before the end. for example, if the end date is 2020-05-17 the end of the event is shown as 2020-05-16.

I tried to increment 1 day on the end date, it only worked on the month view, on the others (week and day) every event is created as being all day.

Vitu_ 77
  • 11
  • 1

1 Answers1

0

Maybe the endDate is considering the 0:00:00 time, in that case you should try to update the hour and minutes, an alternative is using the format of time T23:59:59.000Z that goes after the Date.