ITsolutionWizard
asked on
Full Calendar MVC
I use fullcalendar plugin with mvc.
I knew my MVC API is working and return data. But I do not see the return data on the calendar.
What did i do wrong in Event Push in Jquery?
I knew my MVC API is working and return data. But I do not see the return data on the calendar.
What did i do wrong in Event Push in Jquery?
<script>
function Can() {
$('#calendar').fullCalendar({
header:
{
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
buttonText: {
today: 'today',
month: 'month',
week: 'week',
day: 'day'
},
views: {
basicWeek: {
type: 'basic',
duration: { months: 3 },
rows: 8
}
},
events: function (start, end, timezone, callback) {
$.ajax({
url: '/Park/bookinglist',
type: "Post",
dataType: "JSON",
success: function (result) {
var events = [];
$.each(result, function (i, data) {
//alert(data.ParkProductInventoryCustomNo);
events.push(
{
title: "test",
description: data.ParkProductInventoryCustomNo,
start: moment(data.CheckIn).format('YYYY-MM-DD'),
end: moment(data.CheckOut).format('YYYY-MM-DD'),
backgroundColor: "#9501fc",
borderColor: "#fc0101"
});
});
callback(events);
}
});
},
eventRender: function (event, element) {
element.qtip(
{
content: event.description
});
},
editable: false
});
}
</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sorry I don't get it.
Open in new window