| Issue 130: | Problem using local array as source | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Hi Adam, I'm the person who recently contacted you as to the best place to post a problem I have - and you pointed me here. Thank you and thanks also for a great plugin! This is neither a enhancement request or a bug but more a failure on my part to understand something. My aim is to load the calendar from a local array - I already have the data so don't want to set the Events source as a json php page - however I can't seem to get it work. Where I'm getting stuck is illustrated on the following test page http://www.thekmz.co.uk/GEPlugin/wip/test/cal_test1/cal_test1.htm Calendar1 is just a basic one in which I add an event in the same way as the basic example. Calendar2 adds the event with a simple (non-json) array. This displays ok but is probably not the way to do it as when I look at the array in FireBug it looks strange and the source seems to keep repeating itself. Calendar3 uses a json source (array converted to json using the jquery json plugin). While this looks ok in FireBug the event isn't displayed in the calendar. The pop-up alert when loading the page is the json array for calendar3 - just to check what is. The start date is enclosed in ""s but I'd tried a previous version of the json plugin which doesn't do that but got the same results. Hopefully someone will be able to point out what I'm doing wrong - I'm sure it's simple and I'm just being a bit of a numpty. Thanks in advance Romyn
Oct 29, 2009
#1
romynpg
Oct 29, 2009
Hello Romyn, I am sorry I have taken so long to get back to you. Let me first address the problem in your first post, of Calendar 3 not displaying events: you are converting a javascript array into a json string, and then passing it to fullcalendar. fullcalendar only accepts a javascript array OR a string that is a *URL* to a json file/feed, so this won't work. In your second post you talk about the events array infinitely repeating (when you console.log it after the calendar initializes i assume). i imagine you are drilling down into the _source property. this contains a reference to the parent array itself, so it will inevitably recurse into itself. this is not an issue. taking 10 seconds to display events on the calendar does sound like an issue though, especially if the events come from a static javascript array when the page loads. if this continues to be an issue, can you isolate the problem in an example, and then post it to this thread? thanks.
Nov 10, 2009
respond to this thread if anything mentioned is still in issue for you. i am closing it for now
Status:
Done
|
|
| ► Sign in to add a comment |