-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Loading Array #219
Comments
Reload after navigation may be because you buttons behave like subtit buttons. Add |
Thanks have added the milliseconds to the start and end times as described above. Now seeing the following error:
Again, Im using the method of passing an array to the event_source option. Im guessing the eventData is not an array even though I am coverting the json string with
Has anyone used this method or something similar successfully? Any examples would be awesome. Also I am using the buttons nav buttons and functions in the app.js that are provided in the online demo:
And the related option calls are (exactly from the demo page):
|
If your navigation buttons are inside
Where do you get |
The buttons are not in a form call but exactly as posted (just like your demo). The
as well as perform an eval on it (as in prior post) prior to the options setting to covert it to an array all to no avail. I still get undefined when rendering the events. Thanks much for your help. |
Please, show me code that gets that data. I mean if you use |
I call the function with the follwing and am attemting to parse the JSON like this:
I tried JSON.parse(eventsRaw) but get:
which means the JSON string is undefined. I am dumping it to the browser so I know there is data in the string. The function and related functions to get the data is:
And the eventsRaw is outputting this:
|
That should be [
{"id": "30","title": "123 Maple Ave, Mayberry&&Not Assigned","url": "http://myurl.com/DispForm.aspx?ID=30","class": "event-warning","start": "1412596800000","end": "1412611200000"},{"id": "31","title": "212 Apple Ave, Mayberry&&Johnny Doe/Mary Smith","url": "http://myurl.com/DispForm.aspx?ID=31","class": "event-success","start": "1381060800000","end": "1381075200000"},{"id": "32","title": "163 BEACH St, Mayberry&&Jeff Lickster/Diane Boomer","url": "http://myurl.com/DispForm.aspx?ID=32","class": "event-warning","start": "1390575600000","end": "1390582800000"},{"id": "33","title": "95-20 158 AVENUE, Queens&&Jeff Lickster/Diane Boomer","url": "http://myurl.com/DispForm.aspx?ID=33","class": "event-info","start": "1390572000000","end": "1390581000000"},
{"id": "80","title": "No Address&&Not Assigned","url": "http:/myurl.com/DispForm.aspx?ID=80","class": "event-warning","start": "1391200200000","end": "1391214600000"}
]
|
Then shouldn't this work? As in the Readme:
Thats the first thing I tried. |
I do not think so. Because After you create array output it to |
@mikeharvey: Did you get this worked out? I have exactly the same error. |
I solved the point by using underscore.js for changing a line of code of your library: // original code (see calendar.js) line # 950
self.options.events.sort(function (a, b) {
var delta;
delta = a.start - b.start;
if (delta == 0) {
delta = a.end - b.end;
}
return delta;
});
// my code
self.options.events.result = _.sortBy(self.options.events.result, 'start'); |
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.
My options call looks like this:
I 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:
Also, would the mssing event entries be causing the page to reload from the server after navigation?
Thanks!
The text was updated successfully, but these errors were encountered: