fullcalendar v2

68 views
Skip to first unread message

Jeffrey Frick

unread,
Jun 15, 2016, 10:51:29 AM6/15/16
to KnockoutJS

I'm using knockout and I'm pulling events from an observable array. My events appear in console.log but the calendar doesn't render. If I copy the array from console.log and hard code it, the calendar renders fine. What's the difference. How can I troubleshoot this?

    viewModel.calendarViewModel = new ko.fullCalendar.cModel({
    events: cModel.events,
    header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
    },
    editable: false,
    viewDate: viewModel.viewDate
}, viewModel);

snippet from console.log:

"calendarViewModel": {
"events": [
  {
    "id": 1304,
    "title": "jjf2017_7_9-10",
    "start": "2017-07-08",
    "end": "2017-07-10",
    "Location": "Guest House",
    "backgroundColor": "Color",
    "RoomNumber": "203"
  },
  {
    "id": 1298,
    "title": "JulyTest",
    "start": "2016-07-09",
    "end": "2016-07-18",
    "Location": "Guest House",
    "backgroundColor": "Color",
    "RoomNumber": "205"
  },
  {
    "id": 1299,
    "title": "Julytest2",
    "start": "2016-07-09",
    "end": "2016-07-14",
    "Location": "Guest House",
    "backgroundColor": "Color",
    "RoomNumber": "209"
  },...

noirabys

unread,
Jun 16, 2016, 2:45:55 AM6/16/16
to KnockoutJS
hi,
please add html code as well ... 
Message has been deleted

Jeffrey Frick

unread,
Jun 16, 2016, 8:58:49 AM6/16/16
to KnockoutJS
Hello noirbys,
I've created a fiddle. Please note: The custom binding is for the older FullCalendar v1. I'm trying to get v2 working.
Thanks, Jeff

Jeffrey Frick

unread,
Jun 16, 2016, 9:02:53 AM6/16/16
to KnockoutJS
Updated fiddle

noirabys

unread,
Jun 16, 2016, 11:28:51 AM6/16/16
to KnockoutJS
hi,
i don't think its a problem of knockout...


you may have a closer look on how to update data in the fullCallendar ..
i've added a destroy call which works ... maybe there are other methods which do fit better


best regards,
  noirabys 
Reply all
Reply to author
Forward
0 new messages