Enter event to calendar using a form

Hi there,

Thanks for reaching out to us!

I believe the best place to start is having the form match what the calendar is expecting.

Create a variable and set it to an empty array, or an array of dates from your database.

Then create a query like so!
let dates = variable1.value

dates.push({

allDay: false,

color: colorInput1.value,

end: dateTime2.value,

eventId: "Event" + Number(calendar1.data.length) + 1,

groupId: "",

start: dateTime1.value,

title: textInput1.value

})

variable1.setValue(dates)

Let this query be the Submit Event Handler for your form, as well as an upsert query for your database. The latter part is important for the dates to persist!

There is a similar thread with this setup here: How to create event by selecting a date on the calendar?

Let me know if this setup works for you!