Discourse Calendar (and Event)

:discourse2: Summary Discourse Calendar and Event adds dynamic and interactive calendar and event features to your Discourse site.
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-calendar
:open_book: Install Guide How to install plugins in Discourse

Enabling Calendar (and Event)

The Calendar plugin can be enabled either by the toggle or from its settings, both accessible from your admin/plugins page:

/admin/plugins

Features

Somewhat unsurprisingly, Discourse Calendar (and Event) adds both the calendar and event features to your Discourse site. With these, you can create individual topic calendars to track important occasions or timelines, display calendars in categories, add a holiday calendar to mark vacations, absences, or sick days, create interactive event topics, as well as show an easy-access calendar summary of all of your upcoming events.

Calendars

Bespoke calendars can be created in multiple topics, and ones you wish to give higher visibility to can be displayed above a category’s topic list.

You can find more detailed information on how to create and use calendars in:

Events

The Event feature allows interactive elements to be inserted into topics which your members can use to sign up to attend or participate in your community’s activities. These are all summarised in a dedicated site-wide calendar, with the option to add an easy-access link to your navigation menu. You can find more information on how to create and use this feature in:

:exclamation: This should not be confused with Pavilion’s Events plugin (note the plural)

Calendar Settings

Name Description
calendar enabled Enable the discourse-calendar plugin. This will add support for a [calendar][/calendar] tag in the first post of a topic.
holiday calendar topic id Topic ID of staffs holiday / absence calendar.
holiday status emoji Defines the emoji used for the holiday status.
delete expired event posts after Posts with expired events will be automatically deleted after (n) hours. Set to -1 to disable deletion.
all day event start time Events that do not have a start time specified will start at this time. Format is HH:mm. For 6:00 am, enter 06:00
all day event end time Events that do not have a end time specified will end at this time. Format is HH:mm. For 6:00 pm, enter 18:00
calendar categories Display a calendar at the top of a category. Mandatory settings are categoryId and postId. eg: categoryId=6;postId=453[1] Other valid settings: tzPicker[2], weekends[3] and defaultView[4].
calendar categories outlet Allows to change which outlet should show the category calendar.
working days Set working days. You can display the availability of a group using the timezones tag in a post, eg: [timezones group=admins][timezones]
working day start hour Start time of the working day hours.
working day end hour End time of the working day hours.
close to working day hours extension Set extension time in working day hours to highlight the timezones.
calendar automatic holidays enabled Automatically set holiday status based on a users region (note: you can disable specific automatic holidays in plugin settings)
map events title Maps title of the sidebar calendar based on category. Defaults to “Upcoming events”

Event Settings

Name Description
discourse post event enabled Enables the Event features. Note: also needs calendar enabled to be enabled.
discourse post event allowed on groups Groups that are allowed to create events.
displayed invitees limit Limits the numbers of invitees displayed on an event.
display post event date on topic title Displays the date of the event after the topic title.
use local event date Use local date after topic title instead of relative time.
discourse post event edit notifications time extension Extends (in minutes) the period after the end of an event when going invitees are still being notified from edit in the original post.
discourse post event allowed custom fields Allows to let each event to set the value of custom fields.
events calendar categories Display an events calendar at the top of a category.
sort categories by event start date enabled Enable the sorting of category topics by event start date.
disable resorting on categories enabled Allow categories to disable the ability for users to sort on the event category.
sidebar show upcoming events Show upcoming events link in the sidebar under ‘More’. Requires post event enabled
map events to color Assigns an event color to a specified tag or category

:information_source: :curling_stone: The discourse-post-event/events.json endpoint now has an added parameter to switch between simple and detailed response. To get the detailed response you can add ?include_details=true:

/discourse-post-event/events.json?include_details=true

Integrations with Other Plugins

You can use a component from this plugin with Right Sidebar Blocks. You’ll want to ensure the desired route is enabled in the Right Sidebar Blocks component. The block name will be upcoming-events-list. Historically, there were additional settings required in the Calendar plugin itself, but this has been streamlined.

This is how the sidebar calendar will appear by default.

If you don’t want the time, you can add an empty timeFormat value in the component’s block setting.

:discourse2: Hosted by us? This plugin is available on our Business and Enterprise tiers Calendar | Discourse - Civilized Discussion


  1. categoryId is the category the calendar will be displayed on top of.
    postId is the post in which you put the calendar in with [calendar][/calendar] ↩

  2. it can display a time zone picker on the upper right of the calendar. False by default, you can enable it with tzPicker=true ↩

  3. it can hide Saturdays and Sundays from the calendar. True by default. You can set it to false with weekends=false. ↩

  4. defaultView will set the calendar’s view (day, week, etc;). It can be set as:

    defaultView=agendaDay
    defaultView=agendaWeek
    defaultView=month (default)
    defaultView=listNextYear ↩

Last edited by @benji 2024-12-06T18:00:18Z

Check documentPerform check on document:
94 Likes

This plugin is promising - but there’s some features that are missing that prevents us from jumping from Pavilion’s plugin

  • Display non-all-day events with the start time on the calendar, currently every event looks like an all day event.

  • ‘Add Event’ button in the composer next to the tag selector (not hidden in the cog)

  • Limit which categories can have events, and if a events are compulsory in a category

Nice to haves:

  • Event meta data in the topic only appears/is entered at the top of the topic (instead of where ever the curser is
  • ability to limit which groups can make events in a category (for example - only ‘EventPlanners’ group can create events in the ‘Discussion’ category, but all users can create non-event topics (or edit topics if the topic is set to Wiki)
  • change URL of /upcoming-events to /calendar
13 Likes

2 posts were split to a new topic: Holiday status being incorrectly applied

Hello there,
Thank you for this work.

I have 2 UX questions:

  • Is it possible to display “Add event” button next to “Add location” button in topic editor ? Like it was the case with pavillion plugin ?

  • Is there a possibility to add Calendar top menu entry ? I don’t find it in settings

This looks great! Some thoughts/questions:

Am I correct in assuming that to create a calendar you simply create a new thread/topic, and paste the following into it:

Name Of Calendar 

[calendar]
[/calendar]

Then to add entries to the calendar you simply make a new post in the sam thread with something like the following (by clicking on the insert time/date icon in the post options):

Name of Event/Entry

[date-range from=2024-04-18 to=2024-04-19 timezone="Europe/London"]

This adds the entry to the calendar which is great, however:

  • Is there any way to add entries to a calendar but let those entires have a dedicated thread/topic as well? (I see you can add events in new threads, but there doesn’t appear to be any way to add those events to a calendar).
  • Is there any way to feature ‘Upcoming Events’ from a specific calendar in the digest emails? Or maybe the left hand column, and with each entry linking to the dedicated thread for that entry?

If this is not currently possible do you have any plans to add it?

1 Like

@vinothkannans Could you help me review this pr?

1 Like

Are there plans to add a URL feed that users can subscribe to? I’m sure it would be tricky for all events vs the ones they have RSVP’d to.

Secondly, an additional layer would be amazing if it could recognize private events (or maybe that’s just a different URL feed per group).

2 Likes

There is no rss feed for the /upcoming-events url though—that would be a nice addition!

2 Likes

What about caldav sync ?

4 Likes

That would also for me be a reason to switch, indeed.

This needs more updating as it mentions a. Event Insert in composer and adding event details not as pictured. Unless Event was an add on?

I’ve installed the plug-in and the calendar tag works in the first post of a topic. But I don’t see any event or calendar options in the gear menu:

Can someone please explain what I need to do to get the event option in the gear menu?

You need to enable the Event portion of the plugin discourse post event enabled

2 Likes

Thanks. I somehow missed this setting.

3 Likes

How do you get create event to show in a Category topic with replies being events?

I see the create event works on creating new topics. But looking to have a Calender in a topic with replies adding events. It works partially with insert date but not as good as create event has more options.

1 Like

Currently users can set the region in their profile preferences.
grafik

I’d like to let them set their region during signup by showing this field in the registration form. Is that feasible?

2 Likes

Will a deleted reply still appear on the calendar?

I can’t find any setting for changing first day of week to monday, is this trivial to implement if missing? :thinking:

Another issue is that that time & date entry is broken, if it’s an all day event there should be an option to select it before the time entry fields mess up the dates, and the dates seem to change randomly when editing.

Also noticed that it’s possible to enter 00:00 in both time & date, (which sometimes works, sometimes doesn’t) leading to calendar giving an error which will then cause some conflict with drafts leading to a repeated 422 error until the page is rolled back to an earlier revision, then re-edited etc.

2 Likes

Please refer here

There isn’t such setting and that’s why I don’t use it. And I bet the team would fix that error if it would be trivial trick.

1 Like