David Kimura PRO said over 2 years ago on FullCalendar with StimulusJS :
  If you did add a cancel button, it could be an action when you click on it, it will execute a function. Then in the stimulus controller, you could dismiss the modal.

static targets = ["calendar", "modal", "dismiss", "start_time", "end_time"]

closeModal() {
  this.modalTarget.style.display = "none"
}

And in the view

<div class="modal-footer">
  <%= button_tag "Cancel", "data-action": "calendar#closeModal" %>
  <%= form.submit class: 'btn btn-primary' %>
</div>

I haven't tested this out, but it should be relatively accurate.