{"action":"created","issue":{"url":"https://api.github.com/repos/ArrobeFr/jquery-calendar-bs4/issues/2","repository_url":"https://api.github.com/repos/ArrobeFr/jquery-calendar-bs4","labels_url":"https://api.github.com/repos/ArrobeFr/jquery-calendar-bs4/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/ArrobeFr/jquery-calendar-bs4/issues/2/comments","events_url":"https://api.github.com/repos/ArrobeFr/jquery-calendar-bs4/issues/2/events","html_url":"https://github.com/ArrobeFr/jquery-calendar-bs4/issues/2","id":349994957,"node_id":"MDU6SXNzdWUzNDk5OTQ5NTc=","number":2,"title":"Calendar not working as documented or expected","user":{"login":"webcliq","id":1401189,"node_id":"MDQ6VXNlcjE0MDExODk=","avatar_url":"https://avatars3.githubusercontent.com/u/1401189?v=4","gravatar_id":"","url":"https://api.github.com/users/webcliq","html_url":"https://github.com/webcliq","followers_url":"https://api.github.com/users/webcliq/followers","following_url":"https://api.github.com/users/webcliq/following{/other_user}","gists_url":"https://api.github.com/users/webcliq/gists{/gist_id}","starred_url":"https://api.github.com/users/webcliq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webcliq/subscriptions","organizations_url":"https://api.github.com/users/webcliq/orgs","repos_url":"https://api.github.com/users/webcliq/repos","events_url":"https://api.github.com/users/webcliq/events{/privacy}","received_events_url":"https://api.github.com/users/webcliq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-13T11:42:29Z","updated_at":"2018-08-29T08:41:21Z","closed_at":null,"author_association":"NONE","body":"[test_cliqi_net.zip](https://github.com/ArrobeFr/jquery-calendar-bs4/files/2282773/test_cliqi_net.zip)\r\n\r\nIn order to demonstrate the problem, I created a simple test site on my development machine and I attach a ZIP archive of that website.\r\n\r\nI would like to separate the loading of the Calendar from the events so that I can load, update and delete events via Ajax.\r\n\r\nTo achieve this I tried to follow your documentation and use \"calendar.setEvents()\" as a separate action. When it did not work I back tracked until I created the simple use case attached.\r\n\r\n      /**\r\n       * Init the calendar\r\n       */\r\n      var calendar = $('#calendar').Calendar({\r\n        locale: 'en',\r\n        weekday: {\r\n          timeline: {\r\n            intervalMinutes: 30,\r\n            fromHour: 9\r\n          }\r\n        }\r\n      }).init();\r\n      var events = calendar.setEvents(events).init();\r\n\r\nThe JS Console reports for the second line that \"calendar\" is not defined. Or to put it another way, your code is not returning anything on the first line that the Object named calendar can store."},"comment":{"url":"https://api.github.com/repos/ArrobeFr/jquery-calendar-bs4/issues/comments/416873767","html_url":"https://github.com/ArrobeFr/jquery-calendar-bs4/issues/2#issuecomment-416873767","issue_url":"https://api.github.com/repos/ArrobeFr/jquery-calendar-bs4/issues/2","id":416873767,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjg3Mzc2Nw==","user":{"login":"myseocompany","id":4081174,"node_id":"MDQ6VXNlcjQwODExNzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4081174?v=4","gravatar_id":"","url":"https://api.github.com/users/myseocompany","html_url":"https://github.com/myseocompany","followers_url":"https://api.github.com/users/myseocompany/followers","following_url":"https://api.github.com/users/myseocompany/following{/other_user}","gists_url":"https://api.github.com/users/myseocompany/gists{/gist_id}","starred_url":"https://api.github.com/users/myseocompany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myseocompany/subscriptions","organizations_url":"https://api.github.com/users/myseocompany/orgs","repos_url":"https://api.github.com/users/myseocompany/repos","events_url":"https://api.github.com/users/myseocompany/events{/privacy}","received_events_url":"https://api.github.com/users/myseocompany/received_events","type":"User","site_admin":false},"created_at":"2018-08-29T08:41:21Z","updated_at":"2018-08-29T08:41:21Z","author_association":"NONE","body":"I think that you must first create the object in order to use it lately. Try this:\r\n\r\n```javascript\r\n/**\r\n   * Init the calendar\r\n   */\r\n  var calendar = $('#calendar').Calendar({\r\n    locale: 'en',\r\n    weekday: {\r\n      timeline: {\r\n        intervalMinutes: 30,\r\n        fromHour: 9\r\n      }\r\n    }\r\n  });\r\n  calendar.init();\r\n  var events = calendar.setEvents(events);"}}
{"actor":{"display_login":"myseocompany"}}