Expose the config parameter to limit the number of events fetched in the calendar card #1785
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
This PR exposes the calendar days setting in the calendar card editor, allowing users to configure how many days of events to fetch. On calendars with many events, this improves performance if the number of days displayed is far fewer than 7.
This change also fixes the confusing date range logic. The current logic adds N days * 24hrs to now, which can result in events from more than N days.
Consider if it's currently midday on Monday, 2 days will fetch events up to midday on Wednesday, showing 3 days worth of events. The fixed logic fetches up to 2 calendar days of events, that is 11:59pm Tuesday.
Type of change
Example configuration
Example printscreens/gif
Before , with days = 3

After change, days = 3

New editor field

Additional information
Additional documentation needed.
Users can now configure this limit in the editor
Checklist
If user exposed functionality or configuration variables are added/changed: