Skip to content

Unable to resize an event to include the last time slot (23:30 to 23:59) #2147

@ricky-ho

Description

@ricky-ho

Reproduction link

https://codesandbox.io/s/react-big-calendar-example-forked-8xsd8f?file=/src/App.js

Bug description

When resizing an event, the event cannot be resized to the last time slot (23:30 to 23:59) because the resize step is 30 minutes. The resize is prevented because this would essentially resize the event to the time slot (23:30 to 00:00) of the same day which is impossible.

However, there is a workaround for this when only for dragging and dropping events specified in issue #1625
The workaround described in that issue works because the onEventDrop handler still fires for invalid event drops, which we can then modify the event start and end times.

I wanted to do something similar using the onEventResize handler, but the event handler does not fire on the invalid resize.

Expected Behavior

When resizing events to the last time slot, the end time should be auto-corrected or changed to 23:59, similar to how it is handled when creating an event in the 23:30 to 23:59 time slot. If creating events in the 23:30 to 23:59 time slot works, there should be a way for resize to work as well.

Actual Behavior

Events cannot be resized to include the last time slot at 23:30 to 23:59

react-big-calendar version

0.38.9

React version

17.0.2

Platform/Target and Browser Versions

Chrome

Validations

  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a react-big-calendar issue and not an implementation issue

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions