Saving recurring events from custom lightbox form

Is there any documentation on what sort of values the event is expecting for recurring events?

By reading the documentation at http://docs.dhtmlx.com/doku.php?id=dhtmlxscheduler:recurring_events#rec_type I’m pretty sure I can generate a valid rec_type string. Currently I’m using a test string that the default lightbox form generated.

When I try and save the test rec_type string from my custom lightbox form the end_date gets set to “undefined” and persisted to my database. (The length attribute is automatically populated along the way.)

[code]function save_form() {
var ev = scheduler.getEvent(scheduler.getState().lightbox_id);

    ev.text = html("eventDescription").value;

    // Create a date converter.
    var convertStartDate = scheduler.date.str_to_date("%Y-%m-%d %H:%i");
    var convertEndDate = scheduler.date.str_to_date("%Y-%m-%d %H:%i");

    // Convert the date from strings to Date objects.
    ev.start_date = convertStartDate(html("calendar").value);
    ev.end_date =   convertEndDate(html("calendar2").value);
 
    ev.rec_type = "day_1___#3";  // Test recurring string.
    
    // Second parameter is ID of custom detail form div tag.               
    scheduler.endLightbox(true, html("customSchedulerDetails"));       

}[/code]

What sort of types and/or data is the event expecting for recurring events? Will it calculate the correct end_date for the recurring event or is it expecting me to do that while saving the form data? Is there a dhtmlxscheduler_recurring_debug.js file available that would help explain the recurring event logic?

I appreciate your efforts,
Bill

If you are using custom lightbox you will need to set all event properties, for recurring event it will be

rec_type - recurence string
event_lenght - lenght of event in seconds
end_date - end_date of last event occurence ( if you have event with no end-date, it need to be set to some distant future )

That did the trick. I got it working now. Thanks for the information.

Bill