Categories | Question details Back To List | ||||||||||||||||||||||||||||||||||||||||
Scheduler : How to modify recurring events I'm not able to save a modification on a record of a recurrin event. No problem, if I modifiy a complete recurrin event (applicating modification on all records). I have one record in the database for a recurring event, so I don't understand haw to save a modification in one of its record. For example, I have a event repeated all days during three weeks and I delete one of them ; which information is sent/must be sent to the server to update database. I don't use the connector, but scheduler.attachEvent and build the url. Answer posted by Alex (support) on Jan 11, 2010 06:14 Please see the ready sample in the documentation (scheduler package) dhtmlxScheduler/samples/03_extensions/01_recurring_events.html Also please check the article http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxscheduler:recurring_events#server_side_integration Answer posted by SGI on Jan 11, 2010 07:46 I have ever watch these two elements, but I don't understand the logic to save a recurrin event. Which information are sent to the server? And which modifications must be done on the database? When I modify one event of a reccuring one, I have to insert this one as a simple event and to modify the recurring event. The master event will know that he mustn't consider his ex-son. So, the recurring event "A" becomes two recurring events (one before (A') the simple one and one after(A'')).Is it the logic you've used? If yes, how to identify in the server-side which son of the recurring event has been modified? Will all modifications be sent to the server-side if we use attachEvent() for "onEventChanged", on EventAdded and "onBeforeEventDelete"? Answer posted by Stanislav (support) on Jan 11, 2010 08:20 Modification for some date in sequence ( assuming that this event was not modified before ) Client side !nativeeditor_status = "inserted" start_date, end_date - real start and end dates event_pid - id of serie event_length - time of original event start for example you have "each week, from tuesday to friday", and moving the event 05/01 - 08/01 to 06/01 - 09/01 1263226331281_!nativeedit... | inserted 1263226331281_end_date | 2010-01-10 00:00 1263226331281_event_lengt... | 1262642400 // (new Date(2010-01-05).valueOf())/1000 <= old start date 1263226331281_event_pid | 1505 1263226331281_id | 1263226331281 1263226331281_start_date | 2010-01-06 00:00 1263226331281_text | New event ids | 1263226331281 Deletion of some date in sequence ( assuming that this event was not modified before ) 1263226717653_!nativeedit... | inserted 1263226717653_end_date | 2010-01-06 00:10 //doesn't really matter 1263226717653_event_lengt... | 1262729100 //marker of start, same as above 1263226717653_event_pid | 1506 1263226717653_id | 1263226717653 1263226717653_rec_type | none //important!!! this is String "none" 1263226717653_start_date | 2010-01-06 00:05 1263226717653_text | ids | 1263226717653 | ||||||||||||||||||||||||
Key elements for deleting rec_type = "none" start_date = "start_date" event_pid = sequence ID event_length = start time marker Important, while client sends "inserted" command , for correct work, answer must contain <action type="deleted" ( you can detect this special case by checking "rec_type" , which takes value "none" only in this case ) | |||||||||||||||||||||||||||||||||||||||||