Module:Calendar widget/doc
Appearance
![]() | This is a documentation subpage for Module:Calendar widget. It may contain usage information, categories and other content that is not part of the original module page. |
{{Module rating }}
Usage
{{#invoke:Calendar widget|calendar}}
Parameters
Calendar parameters
|year=
– specifies the year to be used when creating a monthly or yearly calendar; when omitted uses current year|month=
– specifies the month to be used when creating an individual month calendar in the year specified by|year=
; accepts a variety values:- numbers
1
to12
– defaults to current month when month number is out of range - month names (
January
,March
, etc) – defaults to current month when month name is not recognized - keywords:
current
– display the current monthlast
– display the month that occurs before the current monthnext
– display the month that occurs after the current month
- numbers
|iso=
– accepts the single valueyes
; calendar renders in ISO week format (Monday through Sunday); not needed if|iso-wk=
set|iso-wk=
– accepts the single valueyes
; calendar renders in ISO week format (Monday through Sunday) with ISO week number in the left column; setting|iso-wk=yes
automatically sets|iso=yes
Styling parameters
|float=
– position the rendered calendar; default position is at the left page margin:center
– middle of the pageright
– at the right page margin
|hide_year=
– accepts the single valueyes
; suppresses display of year in calendar headers; alias|show_year=off
|show-today=
– accepts the single valueyes
; highlights the current date in the current-month calendar|today_color=
– set the highlight color used by|show-today=
; alias:|today_colour=
|title_color=
– set background color for the month title bar; overrides|color=
; alias:|title_colour=
|week_color=
– set background color for the day-abbreviations title bar; overrides|color=
; alias:|week_colour=
|color=
– shorthand for both|title_color=
and|week_color=
;|color=
yields to|title_color=
and|week_color=
; alias:|colour=
|wknum_color=
– set background color for ISO week numbers; alias:|wknum_colour=
Linking parameters
|lk=
– various date component linking options:d
– link days in calendar to calendar day of calendar month –[[June 7]]
m
– link month in calendar header to month article –[[June]] 2019
y
– link year in calendar header to year article –June [[2025]]
dm
– link to days and monthdy
– link to days and yearmy
– link to month and yearyes
– link all date components
Link prefixes and suffixes
|lk_pref_d=
– prefix for day links|lk_pref_m=
– prefix for month links|lk_suff_d=
– suffix for day links|lk_suff_m=
– suffix for month links|prevnext=
– individual month calendars only; accepts the single valueyes
; adds generic << and >> links to month header linked to the preceding and next month articles|lk_pref_mprev=
– individual month calendars only; prefix for previous-month link|lk_suff_mprev=
– individual month calendars only; suffix for previous-month link|lk_pref_mnext=
– individual month calendars only; prefix for next-month link|lk_suff_mnext=
– individual month calendars only; suffix for next-month link
Examples
if the current page and section is [[An example page#May]]
and there is a May calendar there, to offer links to the previous month (April) and next month (June) sections set:
|k_pref_mprev=#
– creates link to[[An example page#April]]
|k_pref_mnext=#
– creates link to[[An example page#June]]
if the current page is a subpage [[An example page/May]]
and there is a May calendar there, to offer links to the previous month and next month subpages set:
|k_pref_mprev=../
– creates link to[[An example page/April]]
|k_pref_mnext=../
– creates link to[[An example page/June]]
- in
../
,..
is the parent ([[An example page]]
) and/
is the required path separator; see Uniform Resource Identifier
- in