Question

I would like to create a filter dropdown list for my Dhtmlx scheduler. I.e. I want to select an event type from a dropdown list and then only see events matching this criteria in the scheduler.

An example of what I want is that if I select the following event type in my dropdown

{ name = "meetings", key = 1 }

Then I only want to see Calendar events that have the value

{ /* other fields */ Type = 1 }

Any example of how to just show events with value Type == 1 would help, the key here being that this filter is set after the scheduler is loaded.

If this is not possible I'll have to reload the entire scheduler and move the filtering server side, which I'm hoping I can avoid.

Était-ce utile?

La solution

You could use filtering events, Im showing you an example on how I hide events that are appointments in my application (I'm only using month view), obviously you need to attach the event in the dropdown.

scheduler.filter_month = function(id,event){ //Im only hiding them in the month view, you can check on the link I psoted the way to do it in allv iews

if(event.is_appointment == 1) //Im using a custom event with the property is_appointment
return false;
}
scheduler.updateView();

You can find more info on Scheduler Filtering

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top