Calendar:Month template tag
The Calendar:Month tag handles "month-based" formatting and allows you to display a traditional month calendar grid view for a specified month, or the current month.
For performance reasons, please be sure to update any Calendar template tags to use the channel="my_channel|my_other_channel"
parameter, similar to how you would do it for {exp:channel:entries}
. The demo templates don't include this by default since there's no automated way of knowing which channel(s) you're using.
{exp:calendar:month} content {/exp:calendar:month}
Parameters
author_id=
author_id="1"
This parameter allows you to filter down the event results by the author of the Calendar event entries. You can hardcode a member ID, pass it through an embed, or grab it from the URI. You can also use CURRENT_USER to display event entries for the currently logged in user. Separate multiples with the pipe character.
calendar_id=
calendar_id="1|3"
This parameter allows you to display specific calendars by specifying their ID(s). You can hardcode a calendar ID, pass it through an embed, or grab it from the URI. Separate multiples with the pipe character.
calendar_short_name=
calendar_short_name="soccer|baseball|dodgeball"
This parameter allows you to display specific calendars by specifying their short names. You can hardcode a short name, pass it through an embed, or grab it from the URI. Separate multiples with the pipe character.
category=
category="22"
This parameter allows you to filter down the event results by the category ID assigned to calendar event entries. You can hardcode a category ID, pass it through an embed, or grab it from the URI. Separate multiples with the pipe character.
channel=
channel="baseball"
This parameter allows you to filter down the event results by the channel of the calendar event entries. You can hardcode a channel short name, pass it through an embed, or grab it from the URI. Separate multiples with the pipe character.
date_range_start=
{if segment_3} date_range_start="{segment_3}-{segment_4}-01" {if:else}
date_range_start="year-month-01" {/if}
This parameter allows you to specify a particular month to display events for. Regardless of which day of the month you specify, this tag will automatically load the entire month. If this parameter is NOT specified or an incorrect date value is passed to this parameter, the current month will be displayed. Both standard and easy-to-use text date formatting apply to this parameter.
site=
site="siteA|siteB|siteC"
If using EE Multiple Site Manager (MSM), you can specify a site short name(s) in this parameter to filter event entries down to that site.
status=
status="open|extra"
This parameter allows you to filter down the event results by the status of the calendar event entries. You can hardcode a channel short name, pass it through an embed, or grab it from the URI. Separate multiples with the pipe character.
Variables
Most of the variables listed in Calendar:Events are available for use here (inside of the calendar:events variable pair). Additionally, the following variables are available for use as well:
calendar:next_month
{calendar:next_month format="%F"}
This variable displays the month date of the next month. Typically used for linking to next month. Can only be used OUTSIDE of the calendar:events variable pair.
calendar:previous_month
{calendar:previous_month format="%F"}
This variable displays the month date of the previous month. Typically used for linking to previous month. Can only be used OUTSIDE of the calendar:events variable pair.
calendar:month_date
{calendar:month_date format="%F %Y"}
This variable displays the date of the currently specified month. Can only be used OUTSIDE of the calendar:events variable pair.
calendar:month_total_events
{calendar:month_total_events}
This variable displays the total number of events that are happening for a given month. Can only be used OUTSIDE of the calendar:events variable pair.
calendar:week_date
Week of {calendar:week_date format="%F %j, %Y"}
This variable displays the beginning date of the currently specified week. It will parse as if you're using something like "Week beginning Sunday, February 14, 2016". Can only be used INSIDE of the calendar:weeks variable pair, and OUTSIDE of the calendar:events variable pair.
calendar:week_total_events
{calendar:week_total_events}
This variable displays the total number of events that are happening for a given week. Can only be used INSIDE of the calendar:weeks variable pair, and OUTSIDE of the calendar:events variable pair.
calendar:day_date
{calendar:day_date format="%j"}
This variable displays the date of the currently specified day. Can only be used INSIDE of the calendar:days variable pair, and OUTSIDE of the calendar:events variable pair.
calendar:day_total_events
{calendar:day_total_events}
This variable displays the total number of events that are happening for a given day. Can only be used INSIDE of the calendar:days variable pair, and OUTSIDE of the calendar:events variable pair.
Variable Pairs
calendar:days
{calendar:days}{/calendar:days}
This variable pair handles the formatting for each day. It is primarily used to handle the output of each day cell in a full month calendar.
calendar:days_of_week
{calendar:days_of_week} {calendar:day_of_week_full} {/calendar:days_of_week}
This variable pair handles the formatting for each day of the week. It is primarily used for displaying the weekday headings for the month calendar (ex: Monday, Tuesday, Wednesday, etc). Inside of this variable pair, the following formatted date variables are available for use:
{calendar:day_of_week_full}
- parses as Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday{calendar:day_of_week_1_letter}
- parses as S, M, T, W, T, F, S{calendar:day_of_week_2_letter}
- parses as Su, Mo, Tu, We, Th, Fr, Sa{calendar:day_of_week_3_letter}
- parses as Sun, Mon, Tue, Wed, Thu, Fri, Sat{calendar:day_of_week format="%F %j"}
- formatted to your choice using EE date formatting
calendar:weeks
{calendar:weeks}{/calendar:weeks}
This variable pair handles the formatting for each weeks. It is primarily used to handle the output of week rows in a full month calendar.