Odd behaviour with rec_type field


#1

noticed strange behavior, not sure if i did it correctly or am using a reserved word…

have a field that is read rec_type which could be “USER_EVENT”, “NEXT_ACTION”… etc that is stored in the DB

in the following function, i’m simply trying to change the background
scheduler.templates.event_class=function(start, end, event){
if(event.rec_type == ‘CONTRACT_EXPIRY’) {
event.textColor = “white”;
event.color = “red”;
};
etc…
it works, but if you attempt to edit or move the entry on the calendar you can’t, all drag and drop/ double click is gone.

after snooping around, if I cleared the value in the table for field rec_type, then the event would be active again, i could move it edit it etc…

as well I removed the above function and the issue still persisted, it only went back to normal when I cleared out the data in that “rec_type” field…

is that a reserved work elsewhere in dhtml scheduler ??


#2

Hello @sticcino ,
You are right, the rec_type is reserved property, which is used for recurring events, and has to have the correct format. You can read about it by the following link:
https://docs.dhtmlx.com/scheduler/recurring_events.html

The issue should be fixed if you will change this property name to something else.
If it won’t fix the issue, could you please provide me a data on the event, which causes such an issue?
Or you can reproduce it in our snippet tool:
https://snippet.dhtmlx.com/5/29dd2e6d4
open the snippet => reproduce the issue => click the “Share” button => send me the new link.