You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I initialize two calendars on same page as below:
html
<div id="calendar1"></div>
<div id="calendar2"></div>
javascript
$("#calendar1, #calendar2").fullCalendar({
.....
events: function(start, end, timezone, callback) {
var evt1=[{title:'A',start:'2015-02-01'}];
var evt2=[{title:'B',start:'2015-02-01'}];
calendarid = $(this); <== how to get the id?
if (calendarid = 'calendar1') { callback(evt1); }
if (calendarid = 'calendar2') { callback(evt2); }
}, // end of events
.....
}
I initialize two calendars on same page as below:
html
<div id="calendar1"></div>
<div id="calendar2"></div>
javascript
$("#calendar1, #calendar2").fullCalendar({
.....
events: function(start, end, timezone, callback) {
var evt1=[{title:'A',start:'2015-02-01'}];
var evt2=[{title:'B',start:'2015-02-01'}];
calendarid = $(this); <== how to get the id?
if (calendarid = 'calendar1') { callback(evt1); }
if (calendarid = 'calendar2') { callback(evt2); }
}, // end of events
.....
}
Each calendar got its own set of events. How can I know the selector id inside the
events function? Hope that fullCalendar expose the selector id in the events function(start,
end, timezone, callback, calendarid) {...}
Reported by nlok888 on 2015-02-06 04:20:56
Imported with 1 stars.
The text was updated successfully, but these errors were encountered:
I eventually want to shift the API around to have every callback method have the `this`
context be the current calendar object. Then you could execute your methods directly
on that object.
But unfortunately the only solution right now is to initialize them separately.
Originally reported on Google Code with ID 2434
Reported by
nlok888
on 2015-02-06 04:20:56Imported with 1 stars.
The text was updated successfully, but these errors were encountered: