Closed yasserht closed 7 years ago
I would use $scope.$watch
to watch for changes in vm.events
and then fire POST request to API
is it going to e the same function ? can you give me an example ?
Actually, there is much better idea shown here - using <mwl-calendar ... on-event-times-changed="...">
parameter (check out this plunker). You can use same approach and then fire API request inside vm.eventTimesChanged
function.
yes I already tried it, but since Im using drag and drop, i couldn't use both, as in this plunker http://plnkr.co/edit/7hgrMmaSufYjWGeAE6Lu?p=preview
You could have said that in the first place. You can use same function as for drag-and-drop, it'd be enough to check if the event passed to the function is external or not (you can for example add external: true
fields to the external events and then remove them as soon you drop them onto the calendar.
But this solves only dragging and dropping not resizing or moving an event inside the calendar
Hello, how can I change the start and end time of an event in api as well , when I resize it or drag it ?