Search code examples
javascripthtmljqueryfullcalendarfullcalendar-4

FullCalendar, display event creation during select


I'm currently using fullcalendar 4 on my website and I'm trying to add an indicator that the user is selecting in the calendar, there do is the background color changing but it's kind of hard to see.

My goal would be to recreate the selectable date part of the demo page, where if you go into the week vue, you can see the event appear during the select.

I'm stuck since full calendar only activates the select function when the select is over so I don't know how to start creating the event at the select start wether it's with an option in the calendar that I haven't found or if there's another way.

Since it's in the demo I though it would be feasible but right now I'm having a hard time with that


Solution

  • This is done by setting the selectMirror option to true.

    Documentation: https://fullcalendar.io/docs/v4/selectMirror

    Demo: https://codepen.io/ADyson82/pen/RwGBrQP