fullcalendar - Full calendar event rendering happens only for particular week -
i using fullcalendar plugin display data 1 week. problem event rendering week select first. later when change week events getting created not rendering. when change again week selected first, event creation , rendering both happens. using $('#calendar').fullcalendar('gotodate', weekstartdate) go desired week.
$.ajax({ type: "post", contenttype: "application/json", data: '{}', url: 'dataservice.svc/cmstrandselection', datatype: "json", async: false, success: function (data) { $('#calendar').fullcalendar({ header: { left: '', center: '', right: '', height: 300 }, defaultview: 'basicweek', editable: true, columnformat: 'dd dddd', events: $.map(data.d, function (item, i) { debugger; var event = new object(); event.id = item.eventid; event.start = item.start; event.end = item.endd; event.title = item.title event.color = 'white'; event.allday = true; // return event; }), eventrender: function (event, element) { //some code }); } }); $('#calendar').fullcalendar('option', 'height', 400); } });
Comments
Post a Comment