Saving one event in database

Hi I found how to save Calendar into Mysql using 04_export/05_serialize_recurring, but I want to save just one event, and I don’t know how to do it, if I add or update and event save in this moment to mysql.

Other question… How its possible to load dinamyclay the content? If the user change the view between week, month or year, load the events in this range.

Anyone can help me to do it? thanks for advance! :wink:

Hello!

I am sorry, I didn’t quite get it. Can you please explain in detail what are you trying to do?

Check out Dynamical loading section in our documentation.

Best regards,
Ilya

OK I will try to explain it better :smiley:

I would like to know how to add events individually, I found how to export all events 04_export/05_serialize_recurring, but it should clear the database to enter all events. My question is how I can insert into the database event when the user creates it?

Thanks for advance

Component includes ready to use server side layer for php ( similar connector packages exists for java, cf, .net ). You need just configure server side source.

docs.dhtmlx.com/doku.php?id=dhtm … ntegration

If you want to use some custom saving , you can use code like next

scheduler.attachEvent("onEventAdded", function(id){
    var ev = scheduler.getEvent(id);
     //ev - object, with all event's properties
     //you can exec any code to save it to the DB
     return true;
});

Thanks!!! How can I access to the events properties, I found the label for text

event.text

But what is the properties for date? I try event.date but didn’t work.

Thanks for advance!! :smiley:

Hello,

event.start_date, ev.end_date
Same for custom properties if you add them - event.custom_property

Best regards,
Ilya