Calendars are a feature of the Calendar (and Event) plugin. You can find more detail about how to enable them as well as their related settings in: Discourse Calendar (and Event)
Creating a calendar
To embed a calendar, add the following to the first post of a topic (note the separate lines):
[calendar]
[/calendar]
Monday is considered the first day of the week, regardless of the viewer’s locale settings. This is currently not configurable.
Additional calendar options
Option | Example | Values |
---|---|---|
Hide weekends | weekends="false" |
|
Hide specific days | hiddenDays="1,2" |
0-6 for Sunday-Saturday, respectively |
Set the default view | defaultView="basicWeek" |
month , basicWeek , listNextYear |
Ignore timezones | fullDay="true" |
For example:
[calendar weekends="false" hiddenDays="1,2" defaultView="basicWeek" fullDay="true"]
[/calendar]
Adding items to a calendar
To add items to a calendar, use the Insert Date function in the composer to insert a single date or date range in a reply to the topic:
And any text included above the date will be used to describe the calendar entry:
Once the reply is submitted, the entry is added to the calendar and will be displayed after a reload of the topic.
The calendar is always in UTC, so events that are a 24-hour single day in your timezone may appear to span multiple days. The settings
all day event start time
andall day event end time
can be used to reduce this impact.
Deleting calendar items
Expired calendar items can be removed from the calendar automatically using the delete expired event posts after
setting. You can also use the topic timer to auto-delete replies, or manually delete the posts as normal.
Holiday Calendar
There is an optional, special “holiday calendar”, primarily intended to help manage site staff holidays.
This is controlled by the setting holiday calendar topic id
. By setting holiday_calendar_topic_id
to the ID of a topic which has a calendar in the top post, that calendar becomes special — instead of regular calendar entries, any replies will be taken as “vacation time” for that user. These entries will be automatically (and randomly) colored.
It is not currently possible to control the colors, nor to get colored entries in the normal type of calendar.
Additionally, an emoji will appear next to the names of people on vacation in their user cards and when @mentioned in a post. The default is but it can be changed through the setting
holiday_status_emoji
. This is visible to anyone (logged in or not).
The calendar will also by default include an entry for every user for every holiday in that user’s locale, if they’ve set one. This can be toggled off using calendar automatic holidays enabled
.
And there you go. If you have any questions please ask them below, or create a support, bug, feature, or ux topic as appropriate.