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

Dashboard: Customize future date-range #5874

Open
domdorn opened this issue Mar 22, 2024 · 0 comments
Open

Dashboard: Customize future date-range #5874

domdorn opened this issue Mar 22, 2024 · 0 comments
Labels

Comments

@domdorn
Copy link

domdorn commented Mar 22, 2024

Is your feature request related to a problem? Please describe.

I'm using the calendar widget to display upcoming events of a organization I'm part of (german "Verein"). For this, I'm sharing a calendar that's managed by the organization comitee with all members of the nextcloud installation. The calendar widget is by default visible on every users dashboard. Sometimes the next event is in a month, however the widget simply says "no future events"..

I found the corresponding line for this behaviour here

$inTwoWeeks = $dateTime->add(new DateInterval('P14D'));

Describe the solution you'd like

I'd like a way to customize how many days into the future the widget should look.
Either through a setting in config.php or a UI setting in the admin area.

Describe alternatives you've considered

I manually changed the line in CalendarWidget.php in my local installation. However, the file is part of the docker container so will get replaced when I update the container next time.
I also thought that maybe its possible to create a own app that extends the CalendarWidget and just overrides the method, but I haven't found any information on how one app could access a Widget from another app, so its probably easier and better for everyone to get this feature into this app.

Additional context

I'm willing to send a PR for this feature. Imho easiest way would be to allow overriding in config.php with the default value set to the current value of P14D or just integer 14 and constructing the correct string in the widget. Please let me know if this would be acceptable and such a PR would get merged or which solution you would have in mind.

@domdorn domdorn added the enhancement New feature request label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants