discourse/plugins/discourse-calendar
Yuriy Kurant 5c8eb82c06
FEATURE: adds calendar_upcoming_events_default_view setting (#36014)
Adds a new admin calendar setting
`calendar_upcoming_events_default_view` to control the default view for
`/upcoming-events`.

### Details
Admins can now set the default Upcoming events view (`Day`, `Week`,
`Month`, or `Year`) in `Admin -> Plugins -> Calendar and Events >
Settings`.

<img width="892" height="218" alt="Calendar and Events - Settings"
src="https://github.com/user-attachments/assets/2a737bc4-7efc-4142-be98-9f84bf2ae7c3"
/>

Source:
https://meta.discourse.org/t/add-admin-setting-to-change-default-calendar-view-month-week-year/387389.
2025-11-13 19:19:13 +08:00
..
app FIX: maintain wall clock time between DST transitions (#35833) 2025-11-07 13:25:56 +01:00
assets FEATURE: adds calendar_upcoming_events_default_view setting (#36014) 2025-11-13 19:19:13 +08:00
config FEATURE: adds calendar_upcoming_events_default_view setting (#36014) 2025-11-13 19:19:13 +08:00
db/migrate FIX: Job exception: Holidays::InvalidRegion (#35473) 2025-10-17 17:53:53 +02:00
jobs FIX: Job exception: Holidays::InvalidRegion (#35473) 2025-10-17 17:53:53 +02:00
lib FEATURE: adds calendar_upcoming_events_default_view setting (#36014) 2025-11-13 19:19:13 +08:00
spec FEATURE: adds calendar_upcoming_events_default_view setting (#36014) 2025-11-13 19:19:13 +08:00
test/javascripts FIX: "add to calendar" not providing correct ics (#35886) 2025-11-10 14:51:37 +11:00
vendor/holidays DEV: Update the PL holiday definition (#35998) 2025-11-12 20:00:41 +01:00
.prettierignore
package.json DEV: Overhaul typechecking configuration (#35794) 2025-11-12 12:54:34 +00:00
plugin.rb FEATURE: adds calendar_upcoming_events_default_view setting (#36014) 2025-11-13 19:19:13 +08:00
README.md
tsconfig.json DEV: Overhaul typechecking configuration (#35794) 2025-11-12 12:54:34 +00:00

Discourse Calendar

Adds the ability to create a dynamic calendar in the first post of a topic.

Topic discussing the plugin itself can be found here: https://meta.discourse.org/t/discourse-calendar/97376

Customization

Events

  • discourse_post_event_event_will_start this DiscourseEvent will be triggered one hour before an event starts
  • discourse_post_event_event_started this DiscourseEvent will be triggered when an event starts
  • discourse_post_event_event_ended this DiscourseEvent will be triggered when an event ends

Custom Fields

Custom fields can be set in plugin settings. Once added a new form will appear on event UI. These custom fields are available when a plugin event is triggered.

Holidays

See an incorrect or missing holiday? Familiarize yourself with the holiday definition Syntax. Then make your updates in the vendor/holiday/definitions directory.

Generate updated holidays as follows.

cd vendor/holidays

# Generate holiday definitions
rake generate:definitions

Install the plugin and switch to the discourse root(not the plugin directory).

# Collect all holiday regions into assets/javascripts/lib/regions.js
bin/rails javascript:update_constants

Interactions with Other Plugins

You can use an element of this plugin with the Right Sidebar Blocks component. You'll want to ensure the desired route is enabled via the events calendar categories setting. In Right Sidebar Block's settings, the block name will be upcoming-events-list, and the params use this syntax, for example MMMM D, YYYY.