brendan.feltrupexum PRO said over 2 years ago on FullCalendar with StimulusJS :
I tried just using the one supplied along with the event.preventDefault and still errors and adding blank events into calendar. I have spent a few hours reading stimulus controller docs and here is what I have tried to do and still nothing. I could be writing this out wrong, but there is a removeAttribute that can be done and I was thinking this might skip any of the loops. 

calendar_controller.js
select: function (info) {
        _this.modalTarget.style.display = "block"
        _this.start_timeTarget.value = info.start
        _this.end_timeTarget.value = info.end
        }, 


        closeModal(event) {
            event.preventDefault()
            _this.modalTarget.removeAttribute("style");
          },
index.html.erb
<div class="modal-footer">
            <%= button_tag "Close", data: { action: "calendar#closeModal"} %>
            <%= form.submit class: 'btn btn-primary' %>
          </div>

Even after trying to add this. It still sends a post command adding a blank event to the calendar. I cannot wrap my head around this one. By the way this is one of the resources I am following attempting to figure this out: https://tighten.co/blog/stimulus-101-building-a-modal/