2

How can I create a dynamic full calendar in asp.net. version of fullcalendar is 2.2.5 I am not able to find any code for this version of fullcalendar and in earlier version this code doesn't work

Javascript

                $(function () {
                    var str;
                    /* initialize the external events
                     -----------------------------------------------------------------*/
                    function ini_events(ele) {
                        ele.each(function () {
                            var eventObject = {
                                title: $.trim($(this).text())
                            }
                        })
                    }
                    ini_events($('#external-events div.external-event'))
                    //Date for the calendar events (dummy data)
                    var date = new Date()
                    var d = date.getDate(),
                        m = date.getMonth(),
                        y = date.getFullYear();
                    var Calendar = FullCalendar.Calendar;
                    var calendarEl = document.getElementById('calendar');
                    // initialize the external events
                    // -----------------------------------------------------------------
                    var calendar = new Calendar(calendarEl, {
                        headerToolbar: {
                            left: 'prev,next today',
                            center: 'title',
                            right: ''
                        },
                        themeSystem: 'bootstrap',
                        //Random default events
                        events: [
                          {
                              title: "Weekend",
                              daysOfWeek: [0, 6],
                              backgroundColor: '#297109', //red
                              borderColor: '#297109', //red
                              allDay: true
                          }
                        ]
                    });
                    calendar.render();
                })
ADyson
  • 57,178
  • 14
  • 51
  • 63
  • 1
    2.2.5? Are you forced to use an 8 years old library? – Klaus Gütter Sep 10 '22 at 07:31
  • I am using admin LTE Template so it has version 2.2.5 – Vishakh Shetty Sep 10 '22 at 08:31
  • It must be a really old template as well, then. FullCalendar 5 is the latest! – ADyson Sep 13 '22 at 09:15
  • But anyway the official documentation is still there - go to https://fullcalendar.io/docs/v3#toc (v3 and v2 docuementation are the same as they were identical in terms of user-facing features). It contains examples of how to initialise the calendar etc. Also you can find plenty of fullCalendar 3 examples online as that was a popular version, most of the code should work for v2 as well. – ADyson Sep 13 '22 at 09:16

0 Answers0