I need to change left column of agenda day,Instead of Timing there should be My Employee Name List,
and According to Employee Need to Show events in each rows .
What I have tried:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.js"></script>
<script>
$(document).ready(function () {
debugger;
var events = [];
var empNmae = [];
$.ajax({
type: "GET",
url: "/Calendar/GetEvents",
success: function (data) {
debugger;
$.each(data, function (i, v)
{
events.push({
Id: v.Id,
title: v.ShiftName,
start: moment(v.CreatedDate).format('MM/DD/YYYY h:mm a'),
end: moment(v.CreatedDate).format('MM/DD/YYYY h:mm a')
});
})
$.each(data, function (i, v) {
debugger;
events.push({
Id: v.Id,
title: v.EmployeeName,
start: moment(v.CreatedDate).format('MM/DD/YYYY h:mm a'),
end: moment(v.CreatedDate).format('MM/DD/YYYY h:mm a')
});
})
GenerateCalender(events);
},
error: function (error) {
alert('failed');
}
})
function GenerateCalender(events)
{
debugger;
$('#calendar').fullCalendar({
defaultView: 'agendaWeek',
columnHeaderFormat: 'ddd D MMM',
header:
{
left: 'prev,next today',
center: 'title',
right: 'agendaWeek,agendaDay'
},
buttonText: {
today: 'today',
week: 'week',
day: 'day'
},
timeFormat: 'HH:mm',
eventLimit: true,
eventColor: events.ThemeColour,
events: events
})
}
})
</script>