{"action":"created","issue":{"url":"https://api.github.com/repos/Serhioromano/bootstrap-calendar/issues/219","repository_url":"https://api.github.com/repos/Serhioromano/bootstrap-calendar","labels_url":"https://api.github.com/repos/Serhioromano/bootstrap-calendar/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/Serhioromano/bootstrap-calendar/issues/219/comments","events_url":"https://api.github.com/repos/Serhioromano/bootstrap-calendar/issues/219/events","html_url":"https://github.com/Serhioromano/bootstrap-calendar/issues/219","id":26678279,"node_id":"MDU6SXNzdWUyNjY3ODI3OQ==","number":219,"title":"Issue with Loading Array","user":{"login":"mikeharvey","id":6553461,"node_id":"MDQ6VXNlcjY1NTM0NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/6553461?v=4","gravatar_id":"","url":"https://api.github.com/users/mikeharvey","html_url":"https://github.com/mikeharvey","followers_url":"https://api.github.com/users/mikeharvey/followers","following_url":"https://api.github.com/users/mikeharvey/following{/other_user}","gists_url":"https://api.github.com/users/mikeharvey/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeharvey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeharvey/subscriptions","organizations_url":"https://api.github.com/users/mikeharvey/orgs","repos_url":"https://api.github.com/users/mikeharvey/repos","events_url":"https://api.github.com/users/mikeharvey/events{/privacy}","received_events_url":"https://api.github.com/users/mikeharvey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2014-01-31T12:33:23Z","updated_at":"2018-06-06T04:20:11Z","closed_at":null,"author_association":"NONE","body":"I am having an issue loading an array into the calendar which I am building with an SPServices call to a Sharepoint server. Any idea what I am missing here? Everything but the actual event data loads and with no errors in the console. I just don't see events in the calendar.\n\nMy options call looks like this:\n\n```\nvar eventData =  getCalendarData;\nvar options = {\n        events_source: [eventData],\n        view: 'week',\n        tmpl_path: '/SiteAssets/tmpls/',\n        tmpl_cache: false,\n        onAfterEventsLoad: function(events) {\n            if(!events) {\n                return;\n            }\n            var list = $('#eventlist');\n            list.html('');\n\n            $.each(events, function(key, val) {\n                $(document.createElement('li'))\n                    .html('<a href=\"' + val.url + '\">' + val.title + '</a>')\n                    .appendTo(list);\n            });\n        },\n        onAfterViewLoad: function(view) {\n            $('.page-header h3').text(this.getTitle());\n            $('.btn-group button').removeClass('active');\n            $('button[data-calendar-view=\"' + view + '\"]').addClass('active');\n        },\n        classes: {\n            months: {\n                general: 'label'\n            }\n        }\n    };\n```\n\nI am dumping the array to the browser so I am sure the array is being populated prior to the calendar load. An example element of the array looks like this:\n\n```\n{id: \"30\",title: \"123 Maple Ave, Mayberry&&Not Assigned\",url: \"http://mysite.com/Calendar/DispForm.aspx?ID=30\",class: \"event-warning\",start: \"1412596800\",end: \"1412611200\"},\n```\n\nAlso, would the mssing event entries be causing the page to reload from the server after navigation? \n\nThanks!\n"},"comment":{"url":"https://api.github.com/repos/Serhioromano/bootstrap-calendar/issues/comments/394935381","html_url":"https://github.com/Serhioromano/bootstrap-calendar/issues/219#issuecomment-394935381","issue_url":"https://api.github.com/repos/Serhioromano/bootstrap-calendar/issues/219","id":394935381,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDkzNTM4MQ==","user":{"login":"gpcaretti","id":5499871,"node_id":"MDQ6VXNlcjU0OTk4NzE=","avatar_url":"https://avatars0.githubusercontent.com/u/5499871?v=4","gravatar_id":"","url":"https://api.github.com/users/gpcaretti","html_url":"https://github.com/gpcaretti","followers_url":"https://api.github.com/users/gpcaretti/followers","following_url":"https://api.github.com/users/gpcaretti/following{/other_user}","gists_url":"https://api.github.com/users/gpcaretti/gists{/gist_id}","starred_url":"https://api.github.com/users/gpcaretti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpcaretti/subscriptions","organizations_url":"https://api.github.com/users/gpcaretti/orgs","repos_url":"https://api.github.com/users/gpcaretti/repos","events_url":"https://api.github.com/users/gpcaretti/events{/privacy}","received_events_url":"https://api.github.com/users/gpcaretti/received_events","type":"User","site_admin":false},"created_at":"2018-06-06T04:20:11Z","updated_at":"2018-06-06T04:20:11Z","author_association":"NONE","body":"I solved the point by using underscore.js for changing a line of code of your library:\r\n\r\n```javascript\r\n// original code (see calendar.js) line # 950\r\nself.options.events.sort(function (a, b) {\r\n\tvar delta;\r\n\tdelta = a.start - b.start;\r\n\tif (delta == 0) {\r\n\t\tdelta = a.end - b.end;\r\n\t}\r\n\treturn delta;\r\n});\r\n\r\n// my code\r\nself.options.events.result = _.sortBy(self.options.events.result, 'start');\r\n```"}}
{"actor":{"display_login":"gpcaretti"}}