search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Initial events load seems to happen before onBeforeCellRender()

Asked by Iain Cochrane
1 year ago.

Hi there - we're using the onBeforeCellRender() function to display the % allocation for an event, just like your example:

What we see is when the scheduler is first loaded, the % allocation is not shown, indicating that when the event is firing, there isn't an event in that cell to calculate the utilisation. We're loading the events data onScroll(), again, like the example.

When you scroll away and come back, or edit/move an event, the utilisation appears just fine. Same as when you create a new event. Just wondering what it is we're doing wrong. Here's (hopefully), the relevant parts of the code:

dp.scrollDelayEvents = 0;
dp.infiniteScrollingEnabled = true;
dp.dynamicLoading = true;
dp.beforeCellRenderCaching = false;
// load new events as we scroll
dp.onScroll = function (args) {
    args.async = true;

    const start = args.viewport.start;
    const end = args.viewport.end;

        type: "GET",
        url: "/api/events",
        data: {
            start: start.toString(),
            end: end.toString()
        success: function (data) {
   = data;
Comment posted by Iain Cochrane
1 year ago.

I should add that we load resources and then call dp.init(). After the init, scheduler automatically makes a call to the events API passing in the start and end dates like so:


We never make an explicit initial events load call.

Answer posted by Dan Letecky [DayPilot]
1 year ago.

This issue should be fixed now in the latest sandbox build (2020.4.4805). Could you please give it a try and let me know if the problem persists?

Comment posted by Iain Cochrane
1 year ago.

Thanks Dan - that does fix it! And thanks for the fast response too.

Is it OK to use this build in production? We've not bought the license yet (waiting on the PO). When are you expecting this to be formally released?

Comment posted by Dan Letecky [DayPilot]
1 year ago.

Iain - Great, thanks for the update.

The sandbox build is only good for testing and the next release is scheduled for December 15:

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.