-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resource sources should receive start/end params #246
Comments
Workaround for the resources: function(callback) {
setTimeout(function() { // necessary hack
var view = $('#calendar').fullCalendar('getView'); // TODO: update to your selector
/* use view.start and view.end, which are both moments */
/* call callback, just like you normally would */
callback([]);
}, 0);
} Workaround for resources: function(callback) {
setTimeout(function() { // necessary hack
var view = $('#calendar').fullCalendar('getView'); // TODO: update to your selector
$.ajax({
url: 'your feed url',
dataType: 'json',
cache: false,
data: {
start: view.start.format(),
end: view.end.format(),
timezone: view.options.timezone
}
}).then(resources) {
callback(resources);
});
}, 0);
} |
Thank you @arshaw ! |
+1 |
I noticed when I try to get the start date as mentioned above for resources, the date returned by I'm using the j-query calendar as a navigator and setting the date via Any suggestions? I figured this out. You should be using: |
I have the same problem of @CraigHoneyfieldIS.
but on load i have this error in console I take this opportunity to wish you happy new year Thanks |
@CraigHoneyfieldIS thanks, I understand the issue. I'll make a real fix for this soon, but a good ol' I have updated my previously posted sample code to include the timeout hack. |
there's a little mistake I believe in the json feed example. it gave me errors. this works:
|
We need it since we are using interval start and end on resource fetching ( see fullcalendar/fullcalendar-workspace#246)
The
resources
function should now begin to receive astart
,end
, andtimezone
parameter just likeevents
function.The
resources
feed should probably also receive these params for the network request, but only ifrefetchResourcesOnNavigate
is enabled.The text was updated successfully, but these errors were encountered: