Change dynamic all section


  1. I use unit type scheduler.
    scheduler.createUnitsView ({
    name: “united”
    property “SECTION_ID”
    list [
    {key: 1, label: “Section A”},
    {key: 2, label: “Section B”),
    {key: 3, label: “Section C”}
    days: 1,
    size: 8, // number of colomns (employers)
    step: 8 // number of the skip or net page
    When I change the date (from the minicalendar or the top arrows), I want to make ajax to /API from where to take the sections and events for the selected date. Also, I still want to be able to change the value for scheduler.config.first_hour, scheduler.config.last_hour.

Basically, I have other units, other events, other first_hour and last_hour for each calendar day.

Anyone else doing this? The method I tried is the following:
onViewChange make ajax to get all sections and events, but when you try to call updateCollection, this function calls again onViewChange (continuous loop). And also from here I do not know how I could change the values ​​for scheduler.config.first_hour, scheduler.config.last_hour

Another problem:
2. When i tried to load dynamic data with scheduler.load(/api), the event onViewChange is called 2 times(i don’t know why). This methos works fine, all section automatic update from server when ajax is called, but here is another problem
Ex: I change date to 13.07.2018 after that i change to 12.07.2018. this is works fine because is called ajax to /api, but when i change date back to 13.07.2018, ajax is not called and section not changed.(only events changed, probably from cache, i dont know).


I resolved problem.
I used “onBeforeViewChange”. There i call ajax and get all new section and update. I used scheduler.config.first_hour = “new val” in this event for change first/last hour.