Switching Data Sources with two buttons

Hello,

I need to load “two versions of my events” on my scheduler.

Is there a way I can switch between two completely different external data sources on the scheduler, maybe even with two embedded buttons?

Thanks,

Tim Mohr

Hello, Tim.

There are two possible ways:

  1. You load all events (from both data sources) and based on some global flag + event property filter them so events only from one view would be displayed.
    In your button click handler you can change filter functions and refresh current view for them to be applied.

scheduler.filter_day = function(event_id, event){ if(event.property != "something") return false; // event won't be displayed return true; // event will be displayed }
2. Load only events from the required data source, when button is clicked call scheduler.clearAll(); load events from another datasource.

Best regards,
Ilya