search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Switcher for two kind of calendars

Asked by Cezar
2 years ago.

I'd like to have one navigator for two kind of calendars. One (day/week/month) shows paid events and second (day/week/month) shows not paid events. I have this code:
<script type="text/javascript">
var switcher = new DayPilot.Switcher();

switcher.addView(dp_day);
switcher.addView(dp_week);
switcher.addView(dp_month);

switcher.addButton("toolbar_day", dp_day);
switcher.addButton("toolbar_week", dp_week);
switcher.addButton("toolbar_month", dp_month);

switcher.addNavigator(nv);

switcher.show(dp_day);

var switcherN = new DayPilot.Switcher();

switcherN.addView(dn_day);
switcherN.addView(dn_week);
switcherN.addView(dn_month);

switcherN.addButton("toolbar_day", dn_day);
switcherN.addButton("toolbar_week", dn_week);
switcherN.addButton("toolbar_month", dn_month);

switcherN.addNavigator(nv);

switcherN.show(dn_day);
</script>

but only second switcher works fine with navigator, first works only with changing view to day/week/month and changing day on navigator changes only second kind of calendar. How to make navigator works for both of them?

This question is more than 6 months old and has been closed. Please create a new question if you have anything to add.