Hi,
While loading scheduler events , I want to hide some of the events if rec_type==“none”.
scheduler.parse([{“text”:“Task1”,“id”:“1458040356684”,“start_date”:“2016-03-15 01:10:00.0”,“end_date”:“2016-04-14 00:00:00.0”,“rec_type”:“day_1___#”,“event_pid”:"",“event_length”:“2587800”,“section_id”:“4”,“event_status”:null},{“text”:“Task1”,“id”:“1458103543817”,“start_date”:“2016-03-16 01:10:00.0”,“end_date”:“2016-04-15 00:00:00.0”,“rec_type”:“none”,“event_pid”:“1458040356684”,“event_length”:“2587800”,“section_id”:“4”,“event_status”:“delete”}],“json”);
how can I do this. I have used the filter as follows but it does not work for all events.
scheduler.filter_day = function(id, event){
console.log(‘inside filter_day’+id + (event.rec_type==“none”));
if(event.rec_type=="none")
{
//return false; // event will be filtered (not rendered)
}
return true; // event will be rendered
};
Please help.
Hello,
if you attach recurring events extension, such events must be hidden by default.
Seems like event_length in your data is saved incorrectly, please see the deleted instance from the code sample you provided:
{"text":"Task1","id":"1458103543817","start_date":"2016-03-16 01:10:00.0","end_date":"2016-04-15 00:00:00.0","rec_type":"none","event_pid":"1458040356684","event_length":"2587800","section_id":"4","event_status":"delete"}],"json");
And namely, value of event_length:
"event_length":"2587800"
It has the same value as event_length of the series this instance has been deleted from. However, event_lenght of this record must contain a timestamp of deleted instance in this case:
docs.dhtmlx.com/scheduler/recurr … ntheseries
How do you save such events, do you use dhtmlxConnectors or do you have a custom code that does it?
Thank you so much.
event_length data was wrong , I corrected that as per the tips provided in the following link and it is working fine.
docs.dhtmlx.com/scheduler/recurr … ntheseries