Code Monkey home page Code Monkey logo

Comments (3)

estellederrien avatar estellederrien commented on August 17, 2024

I have added

console.log($scope.events);
console.log($scope.eventSources);

inside the $scope.alertOnDrop function, and both are not updated after a drag and drop

from ui-calendar.

estellederrien avatar estellederrien commented on August 17, 2024

This is how my event look like when i dragged it 👍

_allDay: false
​
_end: Object { _isAMomentObject: true, _i: "2019-02-01T23:00:00.000Z", _f: "YYYY-MM-DDTHH:mm:ss.SSSSZ", … }
​
_id: 2
​
_start: {…}
​​
_ambigZone: true
​​
_d: Date 2019-02-19T23:00:00.000Z
​​
_f: "YYYY-MM-DDTHH:mm:ss.SSSSZ"
​​
_fullCalendar: true
​​
_i: "2019-01-29T23:00:00.000Z"
​​
_isAMomentObject: true
​​
_isUTC: true
​​
_locale: Object { _months: (12) […], _monthsShort: (12) […], _fullCalendar_weekCalc: "local", … }
​​
_offset: 0
​​
_pf: Object { empty: false, overflow: -1, charsLeftOver: 0, … }
​​
_tzm: -0
​​
<prototype>: Object { add: hb()
, calendar: jb(), clone: clone()
, … }
​
allDay: false
​
className: Array [ "evenement" ]
​
color: "black"
​
end: Object { _isAMomentObject: true, _i: "2019-02-01T23:00:00.000Z", _f: "YYYY-MM-DDTHH:mm:ss.SSSSZ", … }
​
source: Object { events: (6) […], className: [], origArray: (6) […] }
​
start: Object { _isAMomentObject: true, _i: "2019-01-29T23:00:00.000Z", _f: "YYYY-MM-DDTHH:mm:ss.SSSSZ", … }
​
stick: true
​
title: "Equipe 2 vs equipe 3"
​
<prototype>: {…

Please notice that the correct new date is _d , and the ancient date is _f

from ui-calendar.

estellederrien avatar estellederrien commented on August 17, 2024

Well, i 've found something who will probably work , it is updating $scope.eventSources correctly now after dragging:

$scope.alertOnDrop = function(event, delta, revertFunc, jsEvent, ui, view){
		         $scope.alertMessage = ('Event Droped to make dayDelta ' + delta); 
		         $scope.eventSources[0][1].start = event.start.format();
    };

it is updating the old date value with the dragged date value
i still have to get the correct index each times .

from ui-calendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.