You can use {exp:calendar:calendars}
to list calendars, and pass the {calendar_id}
to {exp:calendar:events}
or {exp:calendar:cal}
to see if there are any event entries for that calendar.
Given that there can be variables clashes with common variables such as {total_results}, {count}, etc, you will likely need to embed the {exp:calendar:events}
or {exp:calendar:cal}
code.
Here's an example. In your template use:
<select name="something">
{exp:calendar:calendars}
{embed="calendars/embed" calendar_id="{calendar_id}"}
{/exp:calendar:calendars}
</select>
Then, in /calendars/embed
, use:
{exp:calendar:events calendar_id="{embed:calendar_id}" date_range_start="12 months ago" date_range_end="+12 months"}
{if no_results}
{/if}
{if count == 1}
[{calendar_id}] {calendar_title}<br />
{/if}
{/exp:calendar:events}
Using a timeframe, with date_range_start=""
and date_range_end=""
, large enough to cover your events is important, or else you only get a subset of the total events present for a calendar.