I am currently working on creating a unique calendar display that showcases all the weekdays and events, regardless of the specific day in a month. The dates extracted from the database may seem "random", but in my C# code, I have devised a method to map each random date to the corresponding day within the current week (using the function public DateTime AssimilarDataAoDiaSemana(string dia, List dts)).
Furthermore, I have included a link to the C# code https://pastebin.com/ipe4t8Pa, which generates a JSON response similar to:
{
"events":[
{
"title": "VIP",
"start": "2018-03-03 10:00:00",
"end": "2018-03-03 11:00:00",
"allDay": false
},
{
"title": "ALMANAQUE DA CACAU",
"start": "2018-02-25 17:00:00",
"end": "2018-02-25 18:00:00",
"allDay": false
}
]
}
This JavaScript function is crucial for rendering the calendar:
function Grade() {
if (VerificarURL("programacao")) {
var cal = $("#calendario").fullCalendar({
events: {
url: "/programacao/calendario",
dataType: "json",
type: "GET",
success: function (data) {
console.log(data);
},
color: "white",
textColor: 'white'
},
columnHeaderFormat: "dddd",
handleWindowResize: true,
header: false,
height: "auto",
defaultView: "agendaWeek",
editable: false,
minTime: "06:00",
maxTime: "24:00",
displayEventTime: false,
allDaySlot: false,
allDayText: false,
timeFormat: "HH(:mm)",
slotLabelFormat: "HH:mm",
});
}
}
The main issue encountered is that the events are not being displayed properly on the client side. Do you have any suggestions or solutions?