Events not saved on inserting or editing

Hi all, I am trying to insert or edit events from outside the calendar. I trigger the lightbox open using scheduler.showLightbox on editing and I use scheduler.addEvent(). Both open the lightbox and all seems right. But when i save the event, nothing happens. This is what is sending to server:

[object Object]
ids 1325685441279

Any help?

Thanks in advance.

Please provide exact code snippet, which you are using for the above operation

I am using this code to create a new event:


I use an anchor an I trigger this function on clicking that anchor.

The php/event_rec.php code is as the example code.

The same for editing events, but i use this:


Both sends same info to server and nothing happens.

I hope this can help you to understand my situation.


Try to use


instead of the above commands

I’ve already tried with that, but I have no results, nothing is saved. When I try triggering lightbox from scheduler it works fine. But when I trigger the lightbox from outside the scheduler nothing happens. When I try to save, the info sent to server is

[object Object]
ids 1325685441279

Instead of all other params that the other way sends to server.

addEventNow causes the same result as creating event through double-clicking, so it must work correctly for any use-case.

If issue still occurs for you - please provide any kind of sample or demo link where it can be reconstructed.

Hi Stanislav,

I send two files where you can check my code. The issue is still present and i cant get rid of it.

Thanks in advance. (7.66 KB)

a) if you need to open lightbox just after new event creation - you still need to use addEventNow instead of addEvent

b) be sure that code in onLightbox doesn’t throw js errors

also, are you including separate dataprocessor.js ? In such case if it is one from dhtmlx 3.0, be sure that you are using latest scheduler ( 3.0 ) as well. If you are including old version of dataprocessor ( from 2.6 ) and using scheduler 3.0 - it also may be the reason of the problem.

Maybe thats the reason, I have an older version of dataprocessor. But why it works fine triggering lightbox directly from scheduler and not working when I try the lightbox from an anchor?

If it is caused by dataprocessor’s version, it must occur for all scenarios of new event creation

Try to exclude dataprocessor.js from the page ( the dhtmlxscheduler.js contains inside its own version of dataprocessor, so code must not broke ) and check will it improve situation or not.

When I use directly from scheduler it works fine. But when I do it from an anchor (onclicking) it does not work. I tried excluding dataprocessor and it does not work.

Still try to remove dataprocessor.js from the page.

It worked but there is a problem. If i remove dataprocessor.js from page I cannot work with grids. There is some kind of collision that i have to get rid. Any idea?

If it works - the you are using scheduler and dhtmlx files from different version. Upgrade all of them to version 3.0 to resolve collisions.

Hi Stanislav,

Thanks for helping out with this issue. Reading through this i was able to figure out some of the things I am trying to achieve but I still have some issues. I am using ASP.NET MVC framework. So I want to place a button outside the scheduler for creating a new event. What I need is for the lightbox to popup without creating the event and once the information is filled and clicked on SAVE then I want the event to be created. What I use currently does the operations in opposite order. first it creates the event and then opens the lightbox. Therefore if I click on cancel on lightbox event will still be there. Here is the code I use.

Try to use

function addNewEvent() { scheduler.addEventNow(start_date, end_date); }