Servoy / fullcalendarcomponent

MIT License
4 stars 2 forks source link

Update the fullcalendar options when using eventSources of type Array gives an error #9

Open paronne opened 6 years ago

paronne commented 6 years ago

When the calendar is using eventSources of type Arrays, a call to updateFullCalendar(option, value) gives the following error:

ERROR org.sablo.websocket.utils.JSONUtils - Error while converting value: org.mozilla.javascript.NativeArray@5d9ed978 of key: events to type: com.servoy.j2db.server.ngclient.property.types.NGCustomJSONArrayType@373c2a23 Definition JSON: PropertyDescription[name: , type: 'svy-fullcalendar.EventType' type, config: {}, default value: null] (no nested child properties) current json: {........}

// an example to replicate the issue
elements.fullcalendar_1.fullCalendar(
eventSources: [{
    id : "array2",
    events: [{
        title: "lunch event",
        start: scopes.svyDateUtils.toStartOfDay(scopes.svyDateUtils.addHours(new Date(), 12)),
        end: scopes.svyDateUtils.toStartOfDay(scopes.svyDateUtils.addHours(new Date(), 13)),
        allDay: false,
        editable: true
    }],
    color: 'gray'
}])
elements.fullcalendar_1.updateFullCalendar("scrollTime", "13:00:00");

This issue relates to https://support.servoy.com/browse/SVY-12490