We've upgraded to the latest release and noticed a change in behaviour. (5.4.x -> 6.x)
When the calendar initially loads, it sends a default data range to the server. It then appears to cache this data so any date selections within that default date range no longer force data updates from the server.
Can we either:
Reduce the default data range when calendar loads to 1 day (today)
OR
Force data updates - always ignore what's cached
Go to the YEAR view and see that it shows a toast that announces it's loading a year's worth of events.
Then click on a month header of one of the months there. It won't make a request for the date range there because it already has it because of the previous load.
Go into the code editor and add alwaysLoadNewDateRange : true to the configuration of the feature, and rerun it and do the same thing.
You will see that when you then click on the month header, it will announce that it has loaded a block of events for that month.
Thanks. Just got there before your reply. Wanted to adjust the initial data range that the calendar selects (2 weeks back/forward from today()) as it's extremely inefficient to retrieve a full month of data in some scenarios.
Got there by adjusting the params.startDate & endDate in beforeSend on initial call
When using a ResourceView, and LoadOnDemand, then in order to know what subviews to create (It has to create one subview of its configured type for each resource in the ResourceStore), it has to first load something into the Project so that there is a ResourceStore to iterate to create views for.
It chooses the month encapsulating the configured date because it is able to use MonthViews. It really might miss out on some data depending on how the backend was coded.
If the backend sends back all resources that you have in the database along with the event load, then there will never be a problem.
If the code is clever and only sends back resources referenced by the events found for the range, then maybe some of your resources won't be returned. If some resource happens to have no events for the week.
If it just sent out a request for the *week", if there just happen to be no events for resource A in that range, then resource A would not get subviews created and you would never be able to add events for that resource.
We manage the resource views on a daily basis. The SQL is fairly complex but ensures we only get what we need. We also have virtual chairs (which are supervisory roles) and a virtual clipboard to cache re-bookings. It all appears to function as it should
So if, for the date range requested, there were no events for "Chair 1 - Jo", would it still send down the data block for "Chair 1 - Jo", so that that resource still gets into the ResourceStore?