How do I gain access to editable in event object via getEventById in fullcalendar?

13 Views Asked by At

The relevant code and the console output is shown below. Naturally, the code line numbers are shown in the log. I did not paste all the code, given the size! However, it did not seem the correct response I should get from getEventById. When I added an alert(evdata.editable) I got undefined.

EVENT OBJECT:

{"id":"8_1","start":"2024-02-22 20:24","end":"2024-02-23 20:24","title":"Eileen","editable":true,"backgroundColor":"#40FF00","textColor":"#000000"}

CODE:

    eventClick: function(info) {
        console.log(info.event.id)
        let evdata = calendar.getEventById( info.event.id )
        console.log(evdata)
    }

CONSOLE LOG:

8_1 calendars.js:228
Object { _context: {…}, _def: {…}, _instance: {…} }
_context: Object { viewTitle: "18 Feb – 24 Feb", calendarApi: {…}, dispatch: dispatch(action)
, … }
_def: Object { title: "Eileen", publicId: "8_1", defId: "232", … }
allDay: false
defId: "232"
extendedProps: Object {  }
groupId: ""​​
hasEnd: true​​
interactive: undefined​​
publicId: "8_1"​​
recurringDef: null
​​sourceId: "16"
​​title: "Eileen"
​​ui: Object { startEditable: true, durationEditable: true, backgroundColor: "#40FF00", … }
​​url: ""
​​<prototype>: Object { … }
​_instance: Object { instanceId: "233", defId: "232", range: {…}, … }
​<prototype>: Object { … }
calendars.js:230
0

There are 0 best solutions below