Could not bind ajax data to events

Create issue
Issue #60 new
Former user created an issue

Tried binding dynamical data thru ajax to events using JSON parse it fails to bind data. If you hard code the data in a same format it works fine. Trying it since 2 days could not find any solution nor documentation provide any information. I hope you will provide solution to the soon and also update to the existing document.

Comments (2)

  1. Haisum Usman

    I have the same problem, i have used onDayClick to achieve it but the calendar is only visible when we have events key filled

                        onDayClick: function(events,jsEvent, view) { 
                          //alert('Day was clicked') 
                          let year          = $(this).attr("data-year");
                          let month         = $(this).attr("data-month");
                          let day           = $(this).attr("data-day");
                          let selected_date = String(year) + "-" + month + "-" + day; 
                          let myparent = $(this).parent();
                          if (myparent.has(" span ").length) {
                            // alert(selected_date);
                            // $('#addTodoModal').modal('show');                      
                            if (month < 9) {
                              month = "0"+String(month);
                            if (day < 9) {
                              day = "0"+String(day);
                            selected_date = String(year) + "-" + month + "-" + day;
                            // alert(selected_date);
                            // $("#todo_date").val(selected_date);
                            // $("#addTodoModal").modal('show');
                        events: todolist


  2. Yohan-Kévin Company

    It seems it needs a "\n" at the end of each line to function, but this is not part of JSON specification and should not be mandatory.

  3. Log in to comment