| Issue 266: | Problem with addEventSource | |
| Back to list |
Hello, The default event source retrieves and displays the calendar events. I then add an additional event source. Using firefox, I can see that the original event source and the new event source are both retrieving, however, the original event source data no longer displays when I change the calendar view. As soon as I remove the additional event source, events from the original source display again. Thanks, Patrick
Dec 30, 2009
#1
pwc1...@gmail.com
Dec 30, 2009
Sorry, but I just found out something else... It seems that when I add an additional
source, the start and end dates sent change from milliseconds to seconds.
Maybe I'm doing something wrong?
In the default retrieve, I use
$.getJSON("../../Calendar/Events/"+dcal,
{ start: start.getTime(),
end: end.getTime(),
}...
I then turn on an additional calendar to pull from programmatically using
$("#cal").fullcalendar('addEventSource','../../Calendar/Events/' + calid);
I then watch the retrieve in firefox and the get now supplies a start and end in
seconds instead of milliseconds (three zeros shorter)
Dec 30, 2009
I have it working now... It appears that when the source is a string, then you supply the datetime in seconds. Once I standardized the datetime from the getTime() everything shows up. Sorry for the confusion! Patrick
Dec 30, 2009
yeah, a string (a url of a json feed) will be given the unix timestamps (seconds) as get parameters. a function will receive 2 javascript Date objects. to get the unix timestamp of the Date object, you need to do Math.round(date.getTime()/1000) glad you got it to work
Status:
Done
|
|
| ► Sign in to add a comment |