Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In a view with two calendars is it possible to filter one event in cal0 with event in cal1? #123

Open
mvphilip opened this issue Sep 22, 2021 · 1 comment

Comments

@mvphilip
Copy link

Hello, If I have a calendar with all day events like public holidays, is there any way to filter a second calendar event based on an attribute of the first? If a day is a "holiday", I'd like to not display events from the second calendar. I tried this in a sort:

    calendars: ["Holidays", "Workdays],
    sort: (a,event)=>{
      if ((a.calendarName.search("Holidays") > -1) &&
      (a.title.search("Day Off") > -1) && 
      a.endDate > b.endDate &&
      a.startDate < b.startDate) {
        b.class_name = "day_off"
        b.isCancelled = true
      }
    },

But this is clearly wrong. Would you have any suggestions?

thank you,

-mp

@mvphilip
Copy link
Author

Hello, I will make a PR for this feature.

thanks,

-mp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant