Found issue in reccurring-scheduler

Hi Team,

I used “dhtmlxscheduler_recurring.js”, but I never could get the value I set in “yearly” recurring mode. So I updated the code as below:

In get_rcode= {

year:function(code,dates){
if (get_radio_value(“year_type”)==“d”){
//comment…
//code.push(“1”);
//add…
code.push(els[“year_day”].value);
code.push(els[“year_month”].value);

	 			dates.start.setMonth(0);
	 			dates.start.setDate(els["year_day"].value);
	 			dates.start.setMonth(els["year_month"].value);
	 			
	 		} else {
	 		    //comment...
	 			//code.push("1");
	 			//add...
	 			code.push(els["year_month2"].value);
	 			code.push(els["year_day2"].value);
	 			code.push(els["year_week2"].value);
	 			dates.start.setDate(1);
	 			dates.start.setMonth(els["year_month2"].value);
	 		}
	 		dates._start = true;
 		} 

}

In set_rcode={

year:function(code,dates){
if (code[3]==""){
els[“year_type”][0].checked=true;
//comment…
//els[“year_day”].value=dates.start.getDate();
//els[“year_month”].value=dates.start.getMonth();
//add…
els[“year_day”].value=code[1];
els[“year_month”].value=code[2];
} else {
els[“year_type”][1].checked=true;
els[“year_week2”].value=code[3];
els[“year_day2”].value=code[2];
//comment…
//els[“year_month2”].value=dates.start.getMonth();
//add…
els[“year_month2”].value=code[1];
}
}
}

I’m not sure my change is right, so I paste them here for your reference.

And also I wanted to know below fields meaning in DB table “events_rec”:
Just for column “rec_type”:
month_var1_var2_var3_#no

year_var1_var2_var3_#no

Here I’m not very clear about var1, var2 and var3, can anyone help me to point out the meaning for in both month and year.

Best wishes,

Judo520

Check
docs.dhtmlx.com/doku.php?id=dhtm … ntegration

it contains details about rec_type format.

Basically

  • val1 - count of years between each event occurrence ( 1 - each year )
  • val2 - week number
  • val3 - day of week

And the current code work correctly for local samples. For example

code.push(“1”);
dates.start.setMonth(0);
dates.start.setDate(els[“year_day”].value);
dates.start.setMonth(els[“year_month”].value);

set start date of event to selected month and date, and enable “repeat each year” mode, which is expected and correct use-case.

If you have some kind of sample where problem can be reconstructed - provide the link.