Recurring events | problem with editing

Hello,

I am using Scheduler 4.2 and have a problem with editing recurring events.

I followed the description in the documentation and creating recurring events works.



But when I try to edit this event it shows “No end date” instead of my selection.

This is the event object shown in IE:


This was tested on IE 9 and FF 31.

I’m using Symfony with an Oracle DB and the database entry is identic to the event object.

This are my related settings:

scheduler.config.occurrence_timestamp_in_utc = false; scheduler.config.include_end_by = true; scheduler.config.repeat_precise = true; scheduler.config.repeat_date = "%d.%m.%Y";

My Lightbox:

scheduler.config.lightbox.sections=[ {name:"description", height:130, map_to:"text", type:"textarea" , focus:true}, {name:"custom", height:23, type:"timeline", options:null , map_to:"KWT_NKWD_NID" }, //type should be the same as name of the tab {name:"recurring", height:115, type:"recurring", map_to:"rec_type", button:"recurring"}, {name:"time", height:72, type:"time", map_to:"auto"} , {name:"created_on", height:23, type:"template", map_to:"created_on_template"}, {name:"created_by", height:23, type:"template", map_to:"created_by_template"} ]

Included JS files:

[code] ‘dhtmlx/dhtmlxcommon.js’
‘dhtmlx/dhtmlxcontainer.js’
‘dhtmlx/dhtmlxform.js’
‘dhtmlx/dhtmlxwindows.js’
‘dhtmlx/ext/dhtmlxwindows_dnd.js’
‘dhtmlx/dhtmlxscheduler.js’
‘dhtmlx/ext/dhtmlxscheduler_limit.js’
‘dhtmlx/ext/dhtmlxscheduler_timeline.js’
‘dhtmlx/ext/dhtmlxscheduler_treetimeline.js’
‘dhtmlx/ext/dhtmlxscheduler_readonly.js’
‘dhtmlx/ext/dhtmlxscheduler_serialize.js’
‘dhtmlx/ext/dhtmlxscheduler_tooltip.js’
‘dhtmlx/ext/dhtmlxscheduler_recurring.js’

    'dhtmlx/live_updates.js'
    'http://domain:8003/sync.js'
    'dhtmlx/locale/locale_de.js'
    'js/init.js' // contains all settings

[/code]

Sincerely,
Philipp Löwen

Hello,
everything seems to work correctly in a simple example, try creating a recurring event and then open it in the lightbox
docs.dhtmlx.com/scheduler/snippet/a78d9cdd
and the data looks the same as on your page screencast.com/t/tyguubQ2
Are there any js errors when you open a lightbox?

Hello,

the problem is the readonly extension. Try this: http://docs.dhtmlx.com/scheduler/snippet/6266968f

But even without using readonly extension, it seems to cache the radio button.
Please try creating multiple recurring events with different settings and open the lightbox .

Sincerely
Loewi

Hello,

to solve this problem use attached recurring extension.
sched_recurring.zip (6.09 KB)

I have the same problem (version 4.2 and 4.3) when i use dhtmlxscheduler_readonly.js.
If i edit a reccuring event series the Radio-Button always jumps to “No end date”. My recurring series was createt with “End by”. The “End by date” itself is shown correct.
I tried the recurring.js from the above post -> still the same problem.

And it is not related to the readonly.js
The state of the time end selection (No, count, end_date) seems to be cached.

Create new series with "End by "
Edit series -> Radio selection on “End by” -> ok

Create new series with “Count”
Edit series > Radio selection on “Count” -> ok
Edit the series created with “End by” -> Radio selection on “Count” -> NOT OK
Refreh Browser -> Edit any series -> Radio selection on “No End” -> NOT OK

This is realy an annoying thing. Having a look into the code it seems that there is a bug in the dhtmlxscheduler.js in function “set_end_rule”. I have no idea what the for-loop does, but i think the code below will not change the behavior of the function. At least it works for me now.

	function set_end_rule(els, value){
		var end = els["end"];
		if(end.length){
			var has_values = !!end[0].value;
			if(has_values){
				for(var i =0; i < end.length; i++){
					if(end[i].value == value)
						end[i].checked = true;
				}
				var ind = 0;
				switch(value){
					case "no":
						ind = 1;
						break;
					case "occurences_count":
						ind = 2;
						break;
					case "date_of_end":
						ind = 3;
						break;
					default:
						break;
				}
				if (ind > 0) {end[ind-1].checked = true}
			} else {
				var ind = 0;
				switch(value){
					case "no":
						ind = 0;
						break;
					case "date_of_end":
						ind = 2;
						break;
					default:
						ind = 1;
						break;
				}
				end[ind].checked = true;
			}
		}else{
			end.value = value;
		}
	}