My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 334: addEventSource function bug
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Feb 2010


Sign in to add a comment
 
Reported by glendelj...@googlemail.com, Feb 10, 2010
// FullCalendar v1.4.4
//
// This is in the documentation page about the "addEventSource" function :
// "Source may be an Array/URL/Function just as in the events option."
//
// Bug : It does not support "Array" or "Function", just "URL".
//
// This is the original function :

addEventSource: function(source) {
// The bug is here, you should have an array of sources in the "eventSources" var,
// something like : [[], 'source1', 'sourceN']
  eventSources.push(source);
// So when you add ("push") an array of new sources to the "eventSources" var,
// the result will be something like :
// ([[], 'source1', 'sourceN', ['newSource1', 'newSourceN']])
// so this generates a bug and the sources will not be displayed again.
  fetchEventSource(source, function() {
    eventsChanged();
  });
}
Feb 26, 2010
Project Member #1 adamrs...@gmail.com
the code is able to handle anything, function, array, whatever. the eventSources array 
is an array of *references*, and they can be anything (function/array). unless you can 
demonstrate a working bug, i dont believe it.
Status: Done
May 30, 2011
#2 lahiris...@gmail.com
Can you please say whats wrong with this?

var events=new Array();     
      var numberofevents = this.serviceVariableGetDates.getTotal();
      
      
      for (i=0;i<numberofevents;i++)
           {
           //alert("numbrr:" + i);
           var dates=this.serviceVariableGetDates.getItem(i);
           console.log(dates.getData());
           var start_date = dates.getValue("c0");
           var end_date = dates.getValue("c1");
           var event_name = dates.getValue("c2");
           //var EventEntry = [ 'title: '+ event_name, 'start: '+ start_date,'end: '+ end_date ];
           events['title'] = event_name;
           events['start'] = start_date;
           events['end'] = end_date;
           events['color'] = "blue";
           this.label1.setCaption(start_date);
           //EventArray.push(EventEntry);
           console.log(events['title']);
           }
      $('#calendar').fullCalendar('addEventSource',events);
      $('#calendar').fullCalendar('rerenderEvents');


The calendar does not show the events in he events array....
Sign in to add a comment

Powered by Google Project Hosting