Recurring enabled by default

Hi,
I want to make recurring events enabled by default with no end date

scheduler.attachEvent(“onEventCreated”, function(id) {
var ev = this.getEvent(id);
ev.event_length = (ev.end_date - ev.start_date)/1000; // length of event in seconds
ev.rec_type = ev.rec_pattern = “week_1___1,2,3,4,5#no”; //repeat each working day
return true;
});

After the event is created it repeats only one time like non-recurring one and in database ‘end_date’ is normal not like it should be: 9999-02-01 00:00:00.
I have to edit this event one more time to ensure that everything is correct.
A little help would be appreciated.

I’ve finally found a solution for my problem on this post:
viewtopic.php?f=6&t=36836

scheduler.attachEvent("onLightbox", function (id){ var ev = scheduler.getEvent(id); if (ev.rec_type) return; // no need to click for existing series var block = scheduler.form_blocks["recurring"]; var node = scheduler.formSection("recurring").node; block.button_click(0, node.previousSibling.firstChild.firstChild, node, node); });