0

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:

enter image description here

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'
    }
})
buræquete
  • 14,226
  • 4
  • 44
  • 89
Dave
  • 1,257
  • 2
  • 27
  • 58
  • What version of Fullcalendar, momentjs, jquery being used? Unable to replicate @ https://jsfiddle.net/996frp04/ with jquery 3.2.1, momentjs 2.18.1, fullcalendar 3.4.0 with above code snippet. – smcd Apr 29 '17 at 03:27
  • i'm using fullcalendar 3.4.0, jquery 3.2.1, and momentjs 2.17.1 – Dave Apr 29 '17 at 03:36
  • should i use the 2.18.1 version of moment? also does it matter if i use the min.js file instead of the js? – Dave Apr 29 '17 at 03:37
  • Using minified vs original of those libraries shouldn't cause a difference in output. I swapped out moment.js 2.18.1 to 2.17.1 to match your setup, still doesn't replicate @ https://jsfiddle.net/996frp04/1/ - is there anything else going on in the page that isn't in the above snippet? – smcd Apr 29 '17 at 03:44
  • Did you find out what was causing the issue? – Diego Armando Maradona Jan 15 '18 at 15:36

1 Answers1

0

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>
Lalji Dhameliya
  • 1,729
  • 1
  • 17
  • 26