var handleRenderFullcalendar=function(){var containerEl=document.getElementById('external-events');var Draggable=FullCalendarInteraction.Draggable;new Draggable(containerEl,{itemSelector:'.fc-event-link',eventData:function(eventEl){return{title:eventEl.innerText,color:eventEl.getAttribute('data-color')};}});var d=new Date();var month=d.getMonth()+1;month=(month<10)?'0'+month:month;var year=d.getFullYear();var day=d.getDate();var today=moment().startOf('day');var calendarElm=document.getElementById('calendar');var calendar=new FullCalendar.Calendar(calendarElm,{headerToolbar:{left:'dayGridMonth,timeGridWeek,timeGridDay',center:'title',right:'prev,next today'},buttonText:{today:'Today',month:'Month',week:'Week',day:'Day'},initialView:'dayGridMonth',editable:true,droppable:true,themeSystem:'bootstrap',eventLimit:true,views:{timeGrid:{eventLimit:6}},events:[{title:'Trip to London',start:year+'-'+month+'-01',end:year+'-'+month+'-05',color:app.color.theme},{title:'Meet with Sean Ngu',start:year+'-'+month+'-02T06:00:00',color:app.color.blue},{title:'Mobile Apps Brainstorming',start:year+'-'+month+'-10',end:year+'-'+month+'-12',color:app.color.pink},{title:'Stonehenge, Windsor Castle, Oxford',start:year+'-'+month+'-05T08:45:00',end:year+'-'+month+'-06T18:00',color:app.color.indigo},{title:'Paris Trip',start:year+'-'+month+'-12',end:year+'-'+month+'-16'},{title:'Domain name due',start:year+'-'+month+'-15',end:year+'-'+month+'-15',color:app.color.blue},{title:'Cambridge Trip',start:year+'-'+month+'-19',end:year+'-'+month+'-19'},{title:'Visit Apple Company',start:year+'-'+month+'-22T05:00:00',color:app.color.green},{title:'Exercise Class',start:year+'-'+month+'-22T07:30:00',color:app.color.orange},{title:'Live Recording',start:year+'-'+month+'-22T03:00:00',color:app.color.blue},{title:'Announcement',start:year+'-'+month+'-22T15:00:00',color:app.color.red},{title:'Dinner',start:year+'-'+month+'-22T18:00:00'},{title:'New Android App Discussion',start:year+'-'+month+'-25T08:00:00',end:year+'-'+month+'-25T10:00:00',color:app.color.red},{title:'Marketing Plan Presentation',start:year+'-'+month+'-25T12:00:00',end:year+'-'+month+'-25T14:00:00',color:app.color.blue},{title:'Chase due',start:year+'-'+month+'-26T12:00:00',color:app.color.orange},{title:'Heartguard',start:year+'-'+month+'-26T08:00:00',color:app.color.orange},{title:'Lunch with Richard',start:year+'-'+month+'-28T14:00:00',color:app.color.blue},{title:'Web Hosting due',start:year+'-'+month+'-30',color:app.color.blue}]});calendar.render();};$(document).ready(function(){handleRenderFullcalendar();});