support icon indicating copy to clipboard operation
support copied to clipboard

calendar.createEvent with empty date triggers an error

Open marciogurka opened this issue 2 months ago • 0 comments

Forum post

"Hi guys, thank you for this amazing product.

I'm trying to do some programatic event creation when App.vue mounted, something like

onMounted() {
	const calendarInstance = calendar.value.instance.value as Calendar;
	calendarInstance.createEvent();
}

But I'm getting

Uncaught (in promise) TypeError: Cannot destructure property 'isRectangle' of 'element' as it is null.

Default view is month, after getting the error and moving to another view and doing window.calendar.createEvent() im not getting that error in that view, but when coming back to default (month) still getting the error.

You can even reproduce this error in https://bryntum.com/products/calendar/examples/print/. Open the browser inspector tools -> Console tab -> do window.calendar.createEvent()."

According to the documentation it should be possible to create an event without providing a date.

marciogurka avatar Apr 18 '24 20:04 marciogurka