twinssbc / Ionic-Calendar

A calendar directive for Ionic framework
http://twinssbc.github.io/Ionic-Calendar/demo
MIT License
159 stars 73 forks source link

Multiple event sources #170

Open akuljana opened 6 years ago

akuljana commented 6 years ago

Is there any way to add multiple calendars/event sources? I have two different event types and they can overlap. I would like to have them in different colors as well. I'm using week view only, and they would show as two different columns in one day.

twinssbc commented 6 years ago

@akuljana Yes, it's possible. You still need to merge the two event sources into a single array and pass it to the calendar. But you could generate different css class based on a field of your event, then set different color for each css class. You could take a look at weekviewNormalEventTemplateUrl option in README. It allows you to custom the event view in weekview, you could add some ng-class logic inside your own template.