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

All-Day Event Stacking Limit #89

Closed
SApolinario opened this issue Jul 15, 2021 · 3 comments
Closed

All-Day Event Stacking Limit #89

SApolinario opened this issue Jul 15, 2021 · 3 comments
Assignees
Labels
T: Feat Type: :tada: New Features

Comments

@SApolinario
Copy link

Would it be possible to limit the number of stocked all-day events that get displayed on a particular day? It's an edge case I'm sure but some people have 10+ all-day events specified in their calendar. Would be nice to have a "+ n more" option to reveal the additional items instead of stacking them all.

Would you have any suggestions as to how to handle this in the meantime?

Thanks

Samuel

@SApolinario SApolinario added the T: Feat Type: :tada: New Features label Jul 15, 2021
@JonasWanke
Copy link
Owner

Yeah, that's probably necessary. #63 also describes the issue of having too many all-day events so that they even cause a layout overflow, but I haven't yet gotten the time to implement a fix. An additional fixed limit sounds like a good idea as well.

In the meantime, you could count the all-day events you return in the event provider and if there are too many, remove some of them and instead add a dummy "event" whose title is "+n". If the user then taps that event, you could open an overlay that contains the remaining events.

@SApolinario
Copy link
Author

SApolinario commented Jul 15, 2021

Yeah I realize a fixed limit may be somewhat tricky as events can potentially span multiple days. FullCalendar seems to have a decent implementation. May be worth looking at when and if you do decide to take this up: https://fullcalendar.io/docs/v4/eventLimit

"In the meantime, you could count the all-day events you return in the event provider and if there are too many, remove some of them and instead add a dummy "event" whose title is "+n". If the user then taps that event, you could open an overlay that contains the remaining events."

Yeah not sure how I'd do that considering the event provider requests all events for a given range of dates. Maybe it'll be easier if I fork the package and make the necessary mod.

Thanks for your quick response. Much appreciated!

Samuel

@JonasWanke JonasWanke self-assigned this Aug 16, 2022
@JonasWanke
Copy link
Owner

JonasWanke commented Aug 19, 2022

I've added this as part of v1.0.0-alpha.9. You can now specify multiDateEventHeaderStyle.maxEventRows (defaults to showing up to three rows plus one with overflow indicators) and multiDateTimetableStyle.maxHeaderFraction (defaults to 0.5). You can react to taps on these overflows using timetableCallbacks.onMultiDateHeaderOverflowTap or customize the overflow widgets themselves using defaultEventBuilder.allDayOverflowBuilder (builds MultiDateEventHeaderOverflow by default).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Feat Type: :tada: New Features
Projects
None yet
Development

No branches or pull requests

2 participants