Comments (5)
Hi Mehdi-Loup,
Can you please guide me how to fix the above issue,
Thanks in Advance
Mani
from ui-calendar.
Hi Mani,
I used the following directive to handle the dragdrop elements: https://github.com/codef0rmer/angular-dragdrop
In the method mutateDraggable of the dragdrop service, i saved the dropped element in a scope variable. Not sure it is the best way to do, but it has been a woriking quick fix.
this.mutateDraggable = function(scope, dropSettings, dragSettings, dragModel, dropModel, dropItem, $draggable) {
var isEmpty = angular.equals(angular.copy(dropItem), {}),
dragModelValue = scope.$eval(dragModel);
scope.dndDropItem = dropItem;
if (dragSettings && dragSettings.placeholder) {
if (dragSettings.placeholder != 'keep'){
if (angular.isArray(dragModelValue) && dragSettings.index !== undefined) {
dragModelValue[dragSettings.index] = dropItem;
} else {
$parse(dragModel + ' = dndDropItem')(scope);
}
}
} else {
if (angular.isArray(dragModelValue)) {
if (isEmpty) {
if (dragSettings && ( dragSettings.placeholder !== true && dragSettings.placeholder !== 'keep' )) {
dragModelValue.splice(dragSettings.index, 1);
}
} else {
dragModelValue[dragSettings.index] = dropItem;
}
} else {
// Fix: LIST(object) to LIST(array) - model does not get updated using just scope[dragModel] = {...}
// P.S.: Could not figure out why it happened
$parse(dragModel + ' = dndDropItem')(scope);
if (scope.$parent) {
$parse(dragModel + ' = dndDropItem')(scope.$parent);
}
}
}
$draggable.css({'z-index': '', 'left': '', 'top': ''});
};
from ui-calendar.
I tried debugging even when i drop an external event on to a calender mutatedraggable is not hitting,
Here is what i tried
For draggable events
%lt ul class="btn btn-droppable" ng-repeat="item in extEvents" data-drop="true" ng-model='extEvents' data-jqyoui-options="{accept:'.btn-draggable:not([ng-model=extEvents])'}" jqyoui-droppable="{index: {{$index}}}">
%lt i class="btn btn-primary btn-draggable" data-drag="true" data-jqyoui-options="{revert: 'invalid',revertDuration:0}" data-ng-model="extEvents" jqyoui-draggable="{index: {{$index}},placeholder:true,animate:true}" ng-hide="!item.title">{{item.title}}
When i drop an event onto a calender it is not fetching the model.
Can you tell me when mutatedragging is hit.
Thanks,
Mani
from ui-calendar.
Hello,
I'm trying the same issue with my calendar, Am I missing something fundamental from the above thread?
Thanks
Sandeep
from ui-calendar.
Has anyone managed to get this working with https://github.com/codef0rmer/angular-dragdrop? I can't get it to hit mutatedraggable at any point, and I'm guessing because of that, it's not hitting uiConfig.calendar.drop. @mehdiloup ?
from ui-calendar.
Related Issues (20)
- How to stop draggable event & how to get drag-over cell date while dragging
- creating new event with dragging HOT 1
- Uncaught TypeError: p.push is not a function at Object.<anonymous> (fullcalendar.min.js?v=1515749727232:23) at e (fullcalendar.min.js?v=1515749727232:23) at Object.<anonymous> (fullcalendar.min.js?v=1515749727232:31) at e (fullcalendar.min.js?v=1515749727232:23) at Object.<anonymous> (fullcalendar.min.js?v=1515749727232:23) at e (fullcalendar.min.js?v=1515749727232:23) at Object.<anonymous> (fullcalendar.min.js?v=1515749727232:49) at e (fullcalendar.min.js?v=1515749727232:23) at fullcalendar.min.js?v=1515749727232:23 at fullcalendar.min.js?v=1515749727232:23
- Is this repository abandoned? HOT 3
- The server has not found anything matching the requested URI GET.../fulalclendar.js
- Drag and drop external elements into calendar
- calendar.fullCalendar is not a function HOT 2
- Unable to view the updated events in the Calendar even on Event Sources Updation.
- TypeError: Cannot read property 'clone' of undefined when changing event title
- How do I control the height of the date cells? If I want to reduce the height of each date cell, how do I do it?
- How do I set the default month for the calendar? By default, it sets it to the current month. HOT 1
- Events are not rendering correctly
- Issue in Calendar
- Event Render not working while appending html in ionic 3
- AngularJS UI-calendar eventSources not updated HOT 3
- Filter date
- calendar gets updated on month change when used in ng-repeat
- Can't drop to some dates HOT 1
- Error when using new fullcalendar version 3.10.2
- Event disappear after switching months and after hitting today
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ui-calendar.