fullcalendar data from json object
up vote
0
down vote
favorite
I load json from a php file but the json contains other data. The events are placed in the 'fullcalendar' object but i do not know how i can select the data.
I load current the data with this code, can someone point me in the right direction?
Greathings Christophe VD
$('#Agenda').fullCalendar({
lang: 'nl',
height: "parent",
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
events: {
url: json_url,
type: 'POST',
data: {
actie: "GetList"
},
success: function(data) {
return data.fullCalendar;
},
error: function(data) {
alert('Systeemfout.');
}
},
eventClick: function(calEvent, jsEvent, view) {
var huur_id = calEvent.id;
weergave(huur_id);
},
dayClick: function(date, jsEvent, view) {
var label = date.format("d-MM-YYYY");
}
})
javascript json fullcalendar
add a comment |
up vote
0
down vote
favorite
I load json from a php file but the json contains other data. The events are placed in the 'fullcalendar' object but i do not know how i can select the data.
I load current the data with this code, can someone point me in the right direction?
Greathings Christophe VD
$('#Agenda').fullCalendar({
lang: 'nl',
height: "parent",
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
events: {
url: json_url,
type: 'POST',
data: {
actie: "GetList"
},
success: function(data) {
return data.fullCalendar;
},
error: function(data) {
alert('Systeemfout.');
}
},
eventClick: function(calEvent, jsEvent, view) {
var huur_id = calEvent.id;
weergave(huur_id);
},
dayClick: function(date, jsEvent, view) {
var label = date.format("d-MM-YYYY");
}
})
javascript json fullcalendar
1
Didn't understand your requirement. Could you please elaborate more
– front_end_dev
Nov 10 at 17:38
if you're not directly returning events in the format required by fullCalendar then you'll need to use this syntax for declaring the "events" property instead. Then you use the provided callback function to return the relevant data to fullCalendar. Alternatively, if you want to stick with the current JavaScript code, make your server just return a flat array of events, instead of an object which then contains an array in a sub-property. Then fullCalendar will detect it automatically and you can remove your "success" callback entirely.
– ADyson
Nov 10 at 20:03
@ADyson, Thanks that did the job. i had try it but it was a white background with white text color so it was empty.
– user3142817
Nov 10 at 23:09
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I load json from a php file but the json contains other data. The events are placed in the 'fullcalendar' object but i do not know how i can select the data.
I load current the data with this code, can someone point me in the right direction?
Greathings Christophe VD
$('#Agenda').fullCalendar({
lang: 'nl',
height: "parent",
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
events: {
url: json_url,
type: 'POST',
data: {
actie: "GetList"
},
success: function(data) {
return data.fullCalendar;
},
error: function(data) {
alert('Systeemfout.');
}
},
eventClick: function(calEvent, jsEvent, view) {
var huur_id = calEvent.id;
weergave(huur_id);
},
dayClick: function(date, jsEvent, view) {
var label = date.format("d-MM-YYYY");
}
})
javascript json fullcalendar
I load json from a php file but the json contains other data. The events are placed in the 'fullcalendar' object but i do not know how i can select the data.
I load current the data with this code, can someone point me in the right direction?
Greathings Christophe VD
$('#Agenda').fullCalendar({
lang: 'nl',
height: "parent",
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
events: {
url: json_url,
type: 'POST',
data: {
actie: "GetList"
},
success: function(data) {
return data.fullCalendar;
},
error: function(data) {
alert('Systeemfout.');
}
},
eventClick: function(calEvent, jsEvent, view) {
var huur_id = calEvent.id;
weergave(huur_id);
},
dayClick: function(date, jsEvent, view) {
var label = date.format("d-MM-YYYY");
}
})
javascript json fullcalendar
javascript json fullcalendar
asked Nov 10 at 17:30
user3142817
4312614
4312614
1
Didn't understand your requirement. Could you please elaborate more
– front_end_dev
Nov 10 at 17:38
if you're not directly returning events in the format required by fullCalendar then you'll need to use this syntax for declaring the "events" property instead. Then you use the provided callback function to return the relevant data to fullCalendar. Alternatively, if you want to stick with the current JavaScript code, make your server just return a flat array of events, instead of an object which then contains an array in a sub-property. Then fullCalendar will detect it automatically and you can remove your "success" callback entirely.
– ADyson
Nov 10 at 20:03
@ADyson, Thanks that did the job. i had try it but it was a white background with white text color so it was empty.
– user3142817
Nov 10 at 23:09
add a comment |
1
Didn't understand your requirement. Could you please elaborate more
– front_end_dev
Nov 10 at 17:38
if you're not directly returning events in the format required by fullCalendar then you'll need to use this syntax for declaring the "events" property instead. Then you use the provided callback function to return the relevant data to fullCalendar. Alternatively, if you want to stick with the current JavaScript code, make your server just return a flat array of events, instead of an object which then contains an array in a sub-property. Then fullCalendar will detect it automatically and you can remove your "success" callback entirely.
– ADyson
Nov 10 at 20:03
@ADyson, Thanks that did the job. i had try it but it was a white background with white text color so it was empty.
– user3142817
Nov 10 at 23:09
1
1
Didn't understand your requirement. Could you please elaborate more
– front_end_dev
Nov 10 at 17:38
Didn't understand your requirement. Could you please elaborate more
– front_end_dev
Nov 10 at 17:38
if you're not directly returning events in the format required by fullCalendar then you'll need to use this syntax for declaring the "events" property instead. Then you use the provided callback function to return the relevant data to fullCalendar. Alternatively, if you want to stick with the current JavaScript code, make your server just return a flat array of events, instead of an object which then contains an array in a sub-property. Then fullCalendar will detect it automatically and you can remove your "success" callback entirely.
– ADyson
Nov 10 at 20:03
if you're not directly returning events in the format required by fullCalendar then you'll need to use this syntax for declaring the "events" property instead. Then you use the provided callback function to return the relevant data to fullCalendar. Alternatively, if you want to stick with the current JavaScript code, make your server just return a flat array of events, instead of an object which then contains an array in a sub-property. Then fullCalendar will detect it automatically and you can remove your "success" callback entirely.
– ADyson
Nov 10 at 20:03
@ADyson, Thanks that did the job. i had try it but it was a white background with white text color so it was empty.
– user3142817
Nov 10 at 23:09
@ADyson, Thanks that did the job. i had try it but it was a white background with white text color so it was empty.
– user3142817
Nov 10 at 23:09
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241588%2ffullcalendar-data-from-json-object%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Didn't understand your requirement. Could you please elaborate more
– front_end_dev
Nov 10 at 17:38
if you're not directly returning events in the format required by fullCalendar then you'll need to use this syntax for declaring the "events" property instead. Then you use the provided callback function to return the relevant data to fullCalendar. Alternatively, if you want to stick with the current JavaScript code, make your server just return a flat array of events, instead of an object which then contains an array in a sub-property. Then fullCalendar will detect it automatically and you can remove your "success" callback entirely.
– ADyson
Nov 10 at 20:03
@ADyson, Thanks that did the job. i had try it but it was a white background with white text color so it was empty.
– user3142817
Nov 10 at 23:09