Discourse Calendar

Summary:

Official calendar plugin for Discourse.

:link: GitHub: https://github.com/discourse/discourse-calendar

:arrow_right: Install: Follow the plugin installation guide.

The Discourse calendar plugin allows you to create a dynamic calendar in the first post of a topic. You can add new events by posting a reply with a date using “Insert Date” modal.

Features

To embed the calendar, add the following BBCode (note the separate lines) in the first post of a topic:

[calendar]
[/calendar]

Optionally you can hide weekends and other days with special attributes. Hidden days are 0 to 6 for Sunday to Saturday respectively.
You can also set the default view to any of these options: month,basicWeek,listNextYear

[calendar weekends="false" hiddenDays="1,2" defaultView="listNextYear"]
[/calendar]

To add events to the calendar, in subsequent replies use the Insert Date function from the composer options menu to insert a single date or date range. For example,

[date=2018-12-20 timezone="America/Boise"] → [date=2018-12-21 timezone="America/Boise"]

Once the reply is submitted, the date range should be added to the calendar in the OP. Once the event is over the post containing the dates will be automatically deleted.

Holiday Calendar

By holiday_calendar_topic_id setting you can use a calendar to manage staff holidays. It will add an emoji :desert_island: next to the staff names in their holiday period. It will also include a calendar icon in their mentions.

Events

Currently an events feature is live in the plugin, but consider it in alpha state. For more information on Events see 🗓 Discourse Event

Screenshots

Dynamic Events Calendar

Holiday Calendar

Holiday Flair

holiday-flair

Holiday Mention Icon

mention

Translations:

https://translate.discourse.org/calendar

CHANGELOG

TODO

67 Likes

FYI This change breaks on stable and beta since there is no TopicView.on_preload there yet.

6 Likes

Fixed the compatibility problem in

11 Likes

Hi community,

how to change the language of the calendar plugin?

I noticed the link to Translations but the plugin does appear in english for me and I can’t find how to switch to german…

2 Likes

Hi,
the plugin locale should follow the default locale or user locale parameter: https://your.domain/admin/site_settings/category/all_results?filter=locale

if you mean the language of the calendar itself, easiest way I’ve found is to fork the plugin and add few options around there:

the options are described here:
locale - Docs | FullCalendar

the locales for the 4.0 version of fullcalendar are found there:
fullcalendar CDN by jsDelivr - A free, fast, and reliable Open Source CDN
and to be added in this file:
discourse-calendar/fullcalendar-with-moment-timezone.min.js at main · discourse/discourse-calendar · GitHub

3 Likes

Great little plugin - really handy! We’re looking to use this as a bit of a planning calendar for a fixed period. Is there a way to fix the calendar for just one month (e.g. July 2021)?

2 Likes

Oh, many thanks for your suggestions.

Yes, my question was about to have the buttons and texts of the calendar (name of month/weekday, switchbuttons for month/week/list, appearence of time of appointment in 24h format rather then 12h am/pm) to appear in german.

Also, I would like to hide the “add to google calendar” links.

Seems what you call “easyest way” is totally green field for me. I think I kind of have an idea of what forking is but as I am a non-developer (still, unfortunately)… this sounds like a lot of work for me to dive into that and get the calendar working in a different language then default english.

So, for now I will not find the time to make progress here. Maybe some magic happens :unicorn: and someone more common with the steps mentioned can support the global non-english speaking userbase?

2 Likes

The calendar doesn’t look too good in dark mode - is there a settings somewhere for this or do I need to use css?

1 Like

well :sweat_smile: it feels for me more like playing with matches than doing magic but here you go:
https://github.com/bdecotte/discourse-calendar

I cannot stress enough that I’m no dev myself and even if I’ll try to keep an eye out for any future update of the real plugin, well… be extra extra careful with your next rebuilds.

So after modifying your app.yml,

  • go to
    https://your.domain/admin/customize/site_texts?q=buttontext
    adapt the four results (Today, Month, Week and List) for the languages your users may choose

  • for the add to google cal issue, go to https://your.domain/admin/customize/themes/2/common/scss/edit (1 being the dark theme, 2 the light one I think, etc…) and add

.fc-list-item-add-to-calendar {
    display: none; 
}
2 Likes