search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Accessing the args data for an event being moved, not the new values for start, end and possibly resource

Asked by Anonymous
10 months ago.

Trying to implement MOVE item. Now at my backend, I’ve stored the events in redis using the encoding.

user:${resource}:${month}`

The resource and month I pass as parameters from the front end.

When I click and move an event, there’s data inside args.e, but its data about where the event was moved to, but in order to update on my backend on redis where keys are stored, I need to search by original resource and month. I have the month, but cant see the original resource. I only have the resource onto which the event was moved to.

{
    "e": {
        "value": "58765f34-f892-64ca-0922-dcd2670f3c92",
        "id": "58765f34-f892-64ca-0922-dcd2670f3c92",
        "text": "M12Q",
        "start": "2024-01-08T00:00:00",
        "end": "2024-01-11T00:00:00",
        "resource": "G1162",
        "isAllDay": false,
        "tag": {}
    },
    "newStart": "2024-01-08T00:00:00",
    "newEnd": "2024-01-11T00:00:00",
    "newResource": "G1162",
    "external": false,
    "ctrl": false,
    "meta": false,
    "shift": false,
    "multimove": [
        {
            "event": {
                "value": "58765f34-f892-64ca-0922-dcd2670f3c92",
                "id": "58765f34-f892-64ca-0922-dcd2670f3c92",
                "text": "M12Q",
                "start": "2024-01-08T00:00:00",
                "end": "2024-01-11T00:00:00",
                "resource": "G1162",
                "isAllDay": false,
                "tag": {}
            },
            "start": "2024-01-08T00:00:00",
            "end": "2024-01-11T00:00:00",
            "overlapping": false,
            "resource": "G1162"
        }
    ],
    "areaData": null
}

Answer posted by Dan Letecky [DayPilot]
10 months ago.

In the onEventMoved event handler, the event object (args.e) is already updated to the new values. If you want to get the old values, you need to use onEventMove where the args.e property stores the original version.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.