Hello, I’ve been using v2.3 of the dhtmlxScheduler, but I have 2 problems.
1st problem: When I am in the day view, I see every item once. But when I open the week view, it loads (dynamically) the items from that week. But the items of the day selected at first are still in there, so they show up double.
2nd problem: When I create an item, somehow all items “lock”. I can drag and drop them, but the new date isn’t saved. When I press F5 to refresh, I can change every item. This only occurs when I place a new item in the scheduler.
I use this code to refresh after placement of an item:
This works. I tried event_id before, but that didn’t work. This works now.
I have a function save_form() which is called from the lightbox popup when you click on save. In save_form() the AJAX is called, then I give a return true, but it doesn’t work. (Tried to put an alert() right before the return true; this is executed, so the scheduler.endLightbox() doesn’t throw an error.
It will be more safe to trigger custom data saving logic from onEventAdded and onEventChanged handlers - they are triggered when edit process is fully finished, so logic attached to them can’t break anything.
I get it, but how do I trigger onEventAdded() and onEventChanged() from a form? The onEventChanged() is already called when I drag’n’drop, but the form doesn’t submit (because it refreshed the page), but it closes and calls another function.
I can’t seem to find something like this in de examples directory.
When lightbox form closing, it must trigger one of above events.
Actually, looking at code, there is no way to skip those events, when you are pressing save button.
onEventAdded will be triggered if event was not saved to DB yet, and onEvenChanged will be triggered for already existing events.
Changed the save-call to the triggers. But didn’t work directly for me. The problem was that the form (which doesn’t close, but hides) still had the 0 value in ID when I created a new item. As soon as I tried to move an item I just placed, it checks if the ID in the form is bigger than 0, if so, it does something else. So I reset the form after every save, and now it works perfectly! Thans for your help.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan