Accessing newly created event in calendar onCreateEvent


Is there a way to access the newly created event in the "on event created" handler for a calendar?
On the same train of thought, is there a way to access the updated event in the "on event updated" handler?

The only ideas I've had for the first is to load the newest item from the array and just blindly use that, which should probably work for the "on created" handler, but fails for the updateds, or to keep the previous and diff the two arrays to attempt and find changes.
It would be much easier if there were a way of accessing that directly, similar to how the table component handles it with "recordUpdates" and "newRow"; Am I missing something or is that functionality missing?
Additionally, assigning a value to selectedEvent seems to have no effect and no setter seems to exist, is that intentional?

Best regards,


Not quite, but for the newly created event, you could access the last item in the events array, which would be the same as the most recently created event. And for the updated event, you could access the selectedEvent, which points to the currently selected event. Depending on your use cases, this would either work just fine or not at all (and it seems like you've run into the latter).

There is no selectedEvent setter available, unfortunately. Looking at the options that populate for the table, it doesn't look like there are any Functions available, so this is a read-only component. Not sure if intentional, or if it's just not a feature we've added yet.
Let me know if you're still blocked here and what your ideal use case is, so we can see if there are any workarounds we can try! :blush: