×Info! PRESS ENTER TO JUMP TO TOP OF '+ sameTypeWidgetRowNum + ' (FACEBOOK FEED), SHIFT+TAB TO CONTINUE INTO FB FEED, OR TAB TO CONTINUE
×Info! PRESS ENTER TO SKIP PAST '+ sameTypeWidgetRowNum + ' (TWITTER FEED), OR TAB TO CONTINUE
×Info! PRESS ENTER TO JUMP TO TOP OF '+ sameTypeWidgetRowNum + ' (TWITTER FEED), SHIFT+TAB TO CONTINUE INTO TWITTER FEED, OR TAB TO CONTINUE
The District Calendar is created in Google.
We encourage families to access our calendars through Google or iCal for the most up-to-date details!
Get Google Calendar
🔗 Android • Computer • iPhone & iPad
Access/Add the calendar to your Google Calendar
Access calendar from any web browser
Access/Add the calendar from iCal or other applications
🔗 iCal URL
Download single-page year-at-a-glance calendars here:
'; var calendarRightIcons = '
'; //add print button calendarRightIcons += ''; //add email button calendarRightIcons += ''; //add subscribe button calendarRightIcons += ''; calendarRightIcons += '
'; $('#fullpage-calendar-content-'+page_calendar_id+' .fc-left').each(function(e) { $(this).append(calendarListToggle); $(this).append(calendarRightIcons); }); // $('#fullpage-calendar-content-'+page_calendar_id+' .fc-right').each(function(e) { // }); //Loop through each calendar and give sub elements ids so can access later $('.calendarDisplay').each(function(e) { var calendar_id = $(this).data('calendar'); var foo = $(this); if (calendar_id) { if (calendar_id && $.isNumeric(calendar_id)) { //loop through fc-view-container of current calendar, assign an id to toggle display //and append listView div to display list $(foo.children('.fc-view-container')).each(function(e) { if ($(this).hasClass('fc-view-container')) { $(this).attr('id', 'fc-view-container_' + calendar_id); } }); foo.append('
'); $('#listView_' + calendar_id).hide(); } } }); //On click of icon, change active classes $(document).delegate('.listIcon', "click", function(event, state) { var calendar_id = $(this).data('calendar'); if (calendar_id) { if ($('#calIcon_' + calendar_id).hasClass('fc-state-active')) { $('#calIcon_' + calendar_id).removeClass('fc-state-active'); $('#listIcon_' + calendar_id).addClass('fc-state-active'); } $('#fc-view-container_' + calendar_id).hide(); $('#listView_' + calendar_id).show(); //$('#listView_' + calendar_id).html('
'); //populate correct events based on current day var calGetDates = $('#full-page-calendar'+page_calendar_id).fullCalendar('getCalendar'); var startUnix = moment(calGetDates.view.start._d).unix() * 1000; var endUnix = moment(calGetDates.view.end._d).unix() * 1000; //first hour of next day 00:00:00 in GMT var listOutput = ''; if (calendars) { $(calendars).each(function(i, val) { if (parseInt(val.id) == parseInt(page_calendar_id)) { //loop through every day from start->end, find every event that occurs on that day var days = date_diff_indays(startUnix, endUnix); //counter for loop var currentDay = new Date(startUnix); //incremented placeholder var today = moment().format('L'); //current day is one before start, increment once currentDay.setDate(currentDay.getDate() + 1); if (days && !isNaN(days)) { //store each days events in an array to sort by time before populating day var dayEvents = {}; var currentDayCounter = 0; for(var i = 0; i <= days; i++) { //loop through events to see if any occur on current day if (val.events) { if (i != currentDayCounter) { //if dayEvents has events, display non-timed events first, //sort the events that are timed, display timed events if (!jQuery.isEmptyObject(dayEvents)) { var nonTimedEvents = {}; var displayEventCounter = 0; Object.keys(dayEvents).forEach(function(i,val) { //add to display events if no time, remove from array if (!dayEvents[i]['start_time'] && !dayEvents[i]['end_time']) { nonTimedEvents[displayEventCounter] = dayEvents[i]['html_output']; delete dayEvents[i]; displayEventCounter++; } else if (dayEvents[i]['start_time']) { if (dayEvents[i]['start_time'] && dayEvents[i]['start_date']) { var start_date_rep = dayEvents[i]['start_date'].replaceAll("-","/"); var startDateTime = start_date_rep + ' ' + dayEvents[i]['start_time']; dayEvents[i]['start_date_time'] = Date.parse(startDateTime); } } }); //sort any remaining (timed) items in array if (!jQuery.isEmptyObject(dayEvents)) { var sortTimes = []; //compile simple array of id and timestamp for sorting Object.keys(dayEvents).forEach(function(i,val) { if (dayEvents[i].start_date_time) { sortTimes.push([dayEvents[i].start_date_time, dayEvents[i].id]); } }); sortTimes.sort(sortFunction); function sortFunction(a, b) { if (a[0] === b[0]) { return 0; } else { return (a[0] < b[0]) ? -1 : 1; } } } else { var sortTimes = []; } if (!jQuery.isEmptyObject(nonTimedEvents) || sortTimes && sortTimes.length > 0) { //due to currentDay being evaulated at the end of the loop and logic executes when //a new day occurs, must use the previous day var currentDayTmp = new Date(currentDay); var previousDay = new Date(currentDayTmp.setDate(currentDayTmp.getDate() - 1)); var monthName = moment(previousDay).format('MMM'); var dayName = moment(previousDay).format('ddd'); var year = moment(previousDay).format('YYYY'); //if today, make box green if (today == moment(previousDay).format('L')) { var boxColor = 'successBox'; } else { var boxColor = 'lightGrayBox'; } listOutput += '
'; listOutput += '
'; listOutput += monthName; listOutput += '
' + previousDay.getDate() + '
'; listOutput += dayName; listOutput += '
'; listOutput += '
'; var eventPerDayCounter = 1; //list untimed events if (!jQuery.isEmptyObject(nonTimedEvents)) { var nonTimedLength = Object.keys(nonTimedEvents).length; Object.keys(nonTimedEvents).forEach(function(i,val) { listOutput += nonTimedEvents[i]; //If not last item, put divider if (eventPerDayCounter != nonTimedLength) { listOutput += '
'; } eventPerDayCounter++; }); } if (sortTimes && sortTimes.length > 0) { var sortedPerDay = 1; //add divider if there are any non-timed events before the timed events if (eventPerDayCounter != 1) { listOutput += '
'; } //loop through sorted times to display them in chronological order by start time $.each(sortTimes, function(i, val) { Object.keys(dayEvents).forEach(function(k,obj) { if (dayEvents[k]['id'] && dayEvents[k]['id'] == sortTimes[i][1]) { listOutput += dayEvents[k]['html_output']; //If not last item, put divider if (sortedPerDay != sortTimes.length) { listOutput += '
'; } sortedPerDay++; } }); }); } listOutput += '
'; listOutput += '
'; listOutput += '
'; } } dayEvents = {}; currentDayCounter = i; } var currentUnix = currentDay.getTime() / 1000; //convert to seconds which moment() uses var eventOutput = ''; $(val.events).each(function(k, obj) { let end_date = moment(val.events[k]['end']); let isValid_end_date = end_date.isValid(); let splitstart = obj.start_date.split('-'); let newStartDate = new Date(splitstart[2], splitstart[0] - 1, splitstart[1]); //have to get the start AND end of start day to correctly see if on that day var startOfDayStart = moment(newStartDate).startOf('day'); var eventStartUnixDayBegin = startOfDayStart.unix(); var endOfDayStart = moment(newStartDate).endOf('day'); var eventStartUnixDayEnd = endOfDayStart.unix(); //have to get the start AND end of end day to correctly see if on that day if (isValid_end_date) { let splitEnd = obj.end_date.split('-'); let newEndDate = new Date(splitEnd[2], splitEnd[0] - 1, splitEnd[1]); var startOfDayEnd = moment(newEndDate).startOf('day'); var eventEndUnixDayBegin = startOfDayEnd.unix(); var endOfDayEnd = moment(newEndDate).endOf('day'); var eventEndUnixDayEnd = endOfDayEnd.unix(); } else { var startOfDayEnd = moment(obj.end_date).startOf('day'); var eventEndUnixDayBegin = startOfDayEnd.unix(); var endOfDayEnd = moment(obj.end_date).endOf('day'); var eventEndUnixDayEnd = endOfDayEnd.unix(); } //if all day it spans into the next day time wise since timezone //isn't being calculated, fix for list view by taking off 12 hours so //it doesn't span into the next day if (obj.allDay == true) { eventEndUnixDayBegin -= 43200; eventEndUnixDayEnd -= 43200; } if ((eventStartUnixDayBegin <= currentUnix && eventEndUnixDayEnd >= currentUnix) || //multi day event in middle (eventStartUnixDayBegin <= currentUnix && eventStartUnixDayEnd >= currentUnix) || //event starts this day (eventEndUnixDayBegin <= currentUnix && eventEndUnixDayEnd >= currentUnix)) { //event ends this day eventOutput = ''; eventOutput += '
'; eventOutput += ' '; eventOutput += ' Title '; // eventOutput += ''; // eventOutput += obj.title; // eventOutput += ''; eventOutput += ' '; eventOutput += obj.title; eventOutput += ' '; eventOutput += ' Source Calendar '; eventOutput += '(Source: ' + title + ')'; eventOutput += ' '; eventOutput += ' Source Calendar '; eventOutput += ''; eventOutput += ''; if (obj.calendar_name) { eventOutput += obj.calendar_name; } eventOutput += ''; eventOutput += ' '; eventOutput += ' Occurs '; //they did not set an end time, defaults to 12:00:00 if (val.events[k]['start_time'] && val.events[k]['end_time'] && isValid_end_date == true) { eventOutput += val.events[k]['start'] + ' ' + val.events[k]['start_time']; eventOutput += ' to ' + val.events[k]['end'] + ' ' + val.events[k]['end_time'] + ' ' + val.events[k]['siteTimeZone']; } else { eventOutput += val.events[k]['start']; } eventOutput += ' | '; eventOutput += ''; if (obj.description && obj.description.trim()) { eventOutput += ' '; eventOutput += ' Details '; eventOutput += obj.description.trim(); eventOutput += ' '; eventOutput += ' Location '; eventOutput += obj.location.trim(); eventOutput += ' '; eventOutput += 'Map'; eventOutput += ' '; } if (obj.directions && obj.directions.trim()) { eventOutput += ''; eventOutput += ' Directions '; eventOutput += obj.directions.trim(); eventOutput += ' '; eventOutput += ' Attachment '; var attachmentName = obj.attachment + ''; // var attachmentName = 'Attachments'; if (obj.attachment.indexOf('/')) { var attachmentArr = obj.attachment.split('/'); var attachmentArrLength = attachmentArr.length - 1; attachmentName = attachmentArr[attachmentArrLength]; } eventOutput += ''; // eventOutput += ''; eventOutput += ''; eventOutput += attachmentName; // eventOutput += 'Attachment'; eventOutput += ''; eventOutput += ' | '; eventOutput += '
'; //add event to day array for sorting if (i == currentDayCounter) { let eventID = dayEvents[obj.id] ? obj.id + k.toString() : obj.id; dayEvents[eventID] = { 'id' : eventID, 'html_output' : '
', 'start' : obj.start, 'start_date' : obj.start_date, 'start_time' : obj.start_time, 'end' : obj.end, 'end_date' : obj.end_date, 'end_time' : obj.end_time, 'all_day' : obj.all_day }; } eventPerDayCounter++; } }); } //increment to next day currentDay.setDate(currentDay.getDate() + 1); } } } }); } if (listOutput && listOutput.length > 0) { listOutput = '
- ' + listOutput + '
'; $('#listView_' + calendar_id).html(listOutput); } else { //no events var listOutput = '
- '; listOutput += '
'; listOutput += '
No events Occurred.
'; listOutput += '
'; listOutput += '
'; $('#listView_' + calendar_id).html(listOutput); } } }); //calculate days between two dates var date_diff_indays = function(date1, date2) { dt1 = new Date(date1); dt2 = new Date(date2); return Math.floor((Date.UTC(dt2.getFullYear(), dt2.getMonth(), dt2.getDate()) - Date.UTC(dt1.getFullYear(), dt1.getMonth(), dt1.getDate()) ) /(1000 * 60 * 60 * 24)); } $(document).delegate('.subscribeIcon', "click", function(event, state) { var calendar_id = $(this).data('calendar'); window.location.href = '/page/subscribe?calendar_id=' + calendar_id; }); //On click of icon, change active classes $(document).delegate('.calendarIcon', "click", function(event, state) { var calendar_id = $(this).data('calendar'); var id = $(this).attr('id'); if (calendar_id) { $('#calIcon_' + calendar_id).addClass('fc-state-active'); if ($('#listIcon_' + calendar_id).hasClass('fc-state-active')) { $('#listIcon_' + calendar_id).removeClass('fc-state-active'); } //change view from list to calendar, show calendar, hide list $('#fc-view-container_' + calendar_id).show(); $('#listView_' + calendar_id).hide(); } }); $(document).delegate('.printIcon', 'click', function(event, state) { var startDate = $('#full-page-calendar'+page_calendar_id).fullCalendar('getView').intervalStart.unix(); var endDate = $('#full-page-calendar'+page_calendar_id).fullCalendar('getView').intervalEnd.unix(); var calendar_id = $(this).data('calendar'); if (startDate && endDate && calendar_id) { if ($(this).hasClass('emailIcon')) { window.location.href = '/page/page_calendar_print?calendar_id=' + calendar_id + '&start_date=' + startDate + '&end_date=' + endDate + '&email=true'; } else { window.location.href = '/page/page_calendar_print?calendar_id=' + calendar_id + '&start_date=' + startDate + '&end_date=' + endDate; } } }); //if linked from sidebar module change view and date to get vars &view=day &date=2016-08-11 if ('' && '') { switch('') { case 'day': $('#full-page-calendar'+page_calendar_id).fullCalendar('changeView', 'agendaDay'); $('#full-page-calendar'+page_calendar_id).fullCalendar('gotoDate', ''); break; } } });