No events in current view detector

Hi there,

I would like to display a message when there are no events displayed in a particular view (e.g. day or week) offering the user to switch to agenda view to see what he has going on.

What’s the best way to detect this condition?

Thank you!
Kate

scheduler.attachEvent("onViewChange", function(){ if (!scheduler.get_visible_events().length){ //there is no events for current view ... } })