Scheduler bug? - addevent on OnChange

Hi, Idk if it is a bug but every time that i change an input, like event text, dates, etc. The event addEvent actives, but i i didn´t even finish to edit an it was already saved.

Also i added a combo and the event doens´t get the combo value

Tagged:

Comments

  • Hello @Dalaz,
    Actually, it is not a bug. Due to the fact that the main view and the sidebar are visible at the same time, the data is saved instantly (onChange event).

    As is the case with every other Jet-based widget, it is possible to fully customize the Scheduler widget according to the required specifications. In your case, you can remove the handler from the config, and when you click on "Done" and "Close" try to save.
    Please take a look at the following example:
    https://snippet.webix.com/h9216ho7

    Also, if the Scheduler hascompact mode, then any changes in the form will be saved after clicking the "Done" on it:
    https://snippet.webix.com/wug5u714

    You can learn more about Scheduler customization in the related chapter of our documentation - https://docs.webix.com/scheduler__customizing.html

  • edited October 30

    Hi @annazankevich , I've modified almost everything but I just wanna know i can reload o load again the view?
    I took your example but I commented the UpdateEvent and send an ajax, in the callback i put this: $$("scheduler").getService("backend").events()
    But the view doesn´t reload

  • Hello,

    The $$("scheduler").getService("backend").events() just issues an Ajax request for new data, but it does not fill the events collection.

    You can reload data into the events Data Collection, which is accessible through the .events() method of the Local Data service. It will call the .events() method from the Backend service and fill the collection. Then, you will need to refresh the app to paint the new data.

    //false means async accessing
    //true is for force reloading
    $$("cal").getService("local").events(false, true).then(()=>{
            $$("cal").$app.refresh();
    });
    

    https://snippet.webix.com/gotp0zfq

    Please note that this will reload the whole data. If you use dynamic loading, or need to reload the current view (week, month, day), the technique will be different.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!