Open schober-ch opened 6 years ago
...somehow the event does not seem to work with any click-event after creation: In my own code I delete an event using the "event-selected"-event, and this also does not work when clicked for the first time (second time does)
Hi @schober-ch,
Thanks for this, I will look into it, is there any chance that you could fork my codesandbox with a failing example?
I don't think this is possible - the error does not happen for events created via props/data in the code (just tested in a fork).
I can provoke the error in any sandbox by just two steps: Create a new event by click&drag in the week-view and then try to move the event.
I can't test any other browser atm (I'm on chromium), but at least it does also happen in an incognito window without any addons/extensions running.
Ah got you, thanks for trying. I will look into it shortly.
So digging around, it looks like that is a bug with fullcalendar
But the reason that their selectable demo is working is because it is creating a proper event after prompting for a title, whereas I think the select helper was tricking you into thinking it had created an event when you selected part of the calendar.
To do this, you should listen for the select
event and add your logic for creating an event. To get you started I have replicated their logic in this sandbox
Hope that helps :)
Ah, interesting. So I assumed too much from their example - thank you for looking into it, I'll change my code. Do you think it would make sense to add an example to the vue-fullcalendar doc for this?
Anyway, its interesting that it works after the second click.
First, thanks for this component, it saved me some work to figure out how to use fullcalendar in vue!
The issue: When trying to move a newly created event after creation for the first time (can be 1 second or 10 seconds) it will give an error:
(full traceback from the sandbox below)
As soon as you move another event or create an additional one, the initial event can be moved without any issues. This happens also in your example sandbox (https://codesandbox.io/s/5xlp873rkl). (To reproduce: First create a new event by click&drag and then immediately try to move it by dragging it somewhere else)
I quickly looked through the FullCalendar.vue-code but did not see anything obvious (but I'm quite new to VueJS).
In the web-example of fullcalendar.io (https://fullcalendar.io/js/fullcalendar-3.7.0/demos/selectable.html) this does not happen.
full error: