Reputation: 15
I have a function that gets a parameter callId
I checked here and in the first log I get the result "Initializing calendar with ID: 1"
But for the second log I can't get the ID "Select calendar ID:"
How can I send the ID in the clouser selection?
function updateCalendar(events, calId) {
console.log('calendar ID inside func updateCalendar', calId);
const csrftoken = document.getElementById('csrf-token').value;
var calendarEl = document.getElementById('calendar');
var eventsData = JSON.parse(document.getElementById('events-data').textContent);
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
events: eventsData,
selectable: true,
selectHelper: true,
editable: true,
eventLimit: true,
select: createSelectHandler(calId, csrftoken),
function createSelectHandler(calId, csrftoken) {
return function(start, end, allDay) {
console.log('calendar ID inside func createSelectHandler', calId);
I want to get a reuslt like this
Initializing calendar with ID: 1
Select event triggered calendarId: 1
here is my updeted screenshot for log FILE https://drive.google.com/file/d/1AsLpHekRb5zUF5WzktMssgNzcMNQr11p/view?usp=sharing
Upvotes: 0
Views: 92