Selecting individual calendars using check boxes or radio buttons for FullCalendar
I am using FullCalendar to create a calendar that shows multiple calendar feeds from google. In addition to this I am looking to added a feature that allows the user to select the calendars he/she views using either check boxes or radio buttons.
The code that brings in the calendars from google is as follows, I am new to JavaScript and in the process of learning using Lynda.com.
eventSources: [
{
url: "https://www.google.com/calendar/feeds/australian__en%40holiday.calendar.google.com/public/basic",
co开发者_Python百科lor: 'red',
},
{
url: "https://www.google.com/calendar/feeds/indian__en%40holiday.calendar.google.com/public/basic",
color: 'green',
},
{
url: "https://www.google.com/calendar/feeds/vietnamese__en%40holiday.calendar.google.com/public/basic",
color: 'yellow',
},
],
Can anyone help me with the html and javascript needed to choose these calendars individually using check boxes or radio buttons?
Just use the "events as a function". In that function, check if the boxes are checked using simple jQuery and if they are, just add those events to an array along with the others and send the array to callback.
精彩评论