Events in dhtmlxCalendar not saved

I have just installed dhtmlxCalendar which looks very nice. But I cannot find what to do to make it save events.

When I make a new event of edit another event, all changes are lost after a refresh of the page.



What am I forgetting?



Mike


Calendar doesn’t save values in cookie automatically. You can can apply own functionality that will save and restore selected date in cookie:


var date = calendar.getDate();


calendar.setDate(date);

I don’t understand… a calendar that cannot save events?


After page refreshing - calendar is initialized again with settings that are defined in its initialization code. The previous selection isn’t saved automatically.


Do you mean dhtmlxCalendar ? Possibly you asked about dhtmlxScheduler …?

oops, yes you are right. it is indeed dhtmlxScheduler…

Samples which loads from static XML can’t save data back to the server.
You need to have some kind of server side scripting available - default package contains sample for php , .net and java can be downloaded separately.

Please check samples/initialization_loading/loading_mysql.html as example.
It uses samples/initialization_loading/events.php for server side action, format of php file is described here
dhtmlx.com/docs/products/dhtmlxS … ml#sch_ssi

to communicate with server side, client side code need to have two next commands


var dp = new dataProcessor(“php/events.php”); //url to server side script
dp.init(scheduler);