问题
I'm trying to use the fullcalendar library in ServiceNow and everything seems to be working fine, but there's something weird going on with the Title:
Is there a way to get rid the undefinedundefined by making changes to the Title object? My current code is pretty simple:
$('#calendar').fullCalendar({
header: {
left: 'today prev,next',
center: 'title',
right: 'month,agendaWeek,agendaDay'
}
})
回答1:
I think you have used different version of full calendar css and js file. in this it works fine. please check your file version used. i hope it should be helps you
$(document).ready(function() {
// page is now ready, initialize the calendar...
$('#calendar').fullCalendar({
header: {
left: 'today prev,next',
center: 'title',
right: 'month,agendaWeek,agendaDay'
}
})
});
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src='http://fullcalendar.io/js/fullcalendar-3.4.0/lib/moment.min.js'></script>
<script src='http://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.min.js'></script>
<div id='calendar'></div>
来源:https://stackoverflow.com/questions/43691292/how-to-edit-title-in-fullcalendar