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

Display Options for Events with Multiple Resources? #106

Closed
meisemann1999 opened this issue Apr 15, 2023 · 5 comments
Closed

Display Options for Events with Multiple Resources? #106

meisemann1999 opened this issue Apr 15, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@meisemann1999
Copy link

I'm not sure if this would be possible with the way the library is written, but I'm wondering if there would be a way to only display an event once if it is assigned to multiple resources, and to stretch out that display across them? In my use case, I am building a calendar for a building with multiple rooms, but there are some building-wide events (cancellations, closings, etc) which I am currently displaying by assigning "resourceIDs" to both rooms. However, the event displays twice on each day because of this. I am using datesAboveResources.

The image below shows a sample - "April Vacation" is a week-long event that applies to the entire building, but is displayed eight times as it re-renders for every day and resource. I realize that this option is not necessarily desirable for all use cases, but would it be possible to create a true/false toggle?
image

@vkurko
Copy link
Owner

vkurko commented Apr 17, 2023

I agree that your case is very specific. But I think that you could implement it yourself if it was possible to mark such events, for example, with a certain css class, and stretch them using css rules to the full width of the calendar. But we are missing a setting like eventClassNames which I will try to add soon.

@meisemann1999
Copy link
Author

I tried this in the inspector today and was successful - setting the .ec-event class to width: calc(200% + 0px) achieved the desired result. I did notice that when datesAboveResources is enabled, the class names are incorrect. The larger containing class (where date is displayed) is still labeled "ec-resource" and the smaller ones (resources) are "ec-date." I understand that the reasoning for this is probably to avoid having to change all the style rules when datesAboveResources is true, just something I noticed.

@vkurko
Copy link
Owner

vkurko commented Apr 18, 2023

I understand that the reasoning for this is probably to avoid having to change all the style rules when datesAboveResources is true

Yes, class names should probably be more generic so that they can be used in different contexts.

@vkurko vkurko added the enhancement New feature or request label May 4, 2023
@vkurko
Copy link
Owner

vkurko commented Jun 14, 2023

eventClassNames has been implemented in v1.5.0. Please check.

@vkurko
Copy link
Owner

vkurko commented Jun 15, 2023

I hope I can close this issue.

@vkurko vkurko closed this as completed Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants