Copy/Paste with recurring event


In my scheduler, if i copy-paste a recurring event, i obtain a bug if i refresh the scheduler.
When i refresh it, i have the loading progress bar but nothing else…
When i look to the Firebug extension console i have this error on the dhtmlxscheduler_recurring.js :

TypeError:[("transpose_" + a.rec_pattern)] is not a function ...attern);for(["transpose_" + a.rec_pattern] (e,d);e<a.start_date||sche...

Any idea to resolve this ?

Can you provide the exact steps, how to reconstruct issue ?
Is it occurs for default sample or only for some custom init ?

I have inserted this code to enable to copy/paste :

[code]scheduler.attachEvent(“onEventCopied”, function(ev) {
dhtmlx.message(“Vous avez copié l’événement :
modified_event_id =;
scheduler.attachEvent(“onEventCut”, function(ev) {
dhtmlx.message(“Vous avez coupé l’événement :
modified_event_id =;

	scheduler.attachEvent("onEventPasted", function(isCopy, modified_ev, original_ev) {
			modified_event_id = null;

			var evs = scheduler.getEvents(modified_ev.start_date, modified_ev.end_date);
			if (evs.length > 1) {
					text: "Il y a déjà un événement à ce moment ! Que voulez-vous faire ?",
					width: "500px",
					position: "middle",
					buttons:["Annuler", "Modifier l'événement", "Confirmer"],
					callback: function(index) {
						switch(+index) {
							case 0:
								if (isCopy) {
									// copy operation, need to delete new event
								} else {
									// cut operation, need to restore dates
									modified_ev.start_date = original_ev.start_date;
									modified_ev.end_date = original_ev.end_date;
							case 1:
							case 2:

I’ve seen that when the problem occured, in the database, the field rec_type have the string value “null” (the field is not null, there is the string “null” in it).

Problem confirmed and fixed, please try to use the attached js file instead of the original one. (889 Bytes)


Thanks for this update.
I have another problem :
when i cpy/paste an event, it only copy/paste the title and duration of the event. Other fields are not pasted.
Any idea ?

Is it occurs for all event or only for recurring ones ?

It occurs only for recurring events

This is expected, you can use onEventPasted to set extra details

scheduler.attachEvent("onEventPasted", function(copy, new_ev, ev){ if (copy) new_ev.some = ev.some; });

That resolve my problem.
Thanks a lot