Module:Calendar widget/doc
MyWikiBiz, Author Your Legacy — Wednesday December 25, 2024
Jump to navigationJump to searchThis is the documentation page for Module:Calendar widget
{{Module rating }}
Usage
{{#invoke:Calendar widget|calendar}}
Parameters
Calendar parameters
- Template:Para – specifies the year to be used when creating a monthly or yearly calendar; Gregorian calendar only; minimum 1583 for yearly calendar; minimum October 1582 for stand-alone month calendar; when omitted or out of range, uses current year
- Template:Para – specifies the month to be used when creating an stand-alone month calendar in the year specified by Template:Para; 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
- Template:Para – yearly calendars only; number of columns
Template:Var
to be used for calendar rendering; default is4
; values ofTemplate:Var
less than 1 or greater than 12 ignored - Template:Para – accepts the single value
yes
; calendar renders in ISO week format (Monday through Sunday); not needed if Template:Para set - Template:Para – accepts the single value
yes
; calendar renders in ISO week format (Monday through Sunday) with ISO week number in the left column; setting Template:Para automatically sets Template:Para
Styling parameters
- Template:Para – position the rendered calendar; default position is at the left page margin:
center
– middle of the pageright
– at the right page margin
- Template:Para – accepts the single value
yes
; suppresses display of year in calendar headers; alias Template:Para - Template:Para – accepts the single value
yes
; highlights the current date in the current-month calendar - Template:Para – set the highlight color used by Template:Para; alias: Template:Para
- Template:Para – set background color for the month title bar; overrides Template:Para; alias: Template:Para
- Template:Para – set background color for the day-abbreviations title bar; overrides Template:Para; alias: Template:Para
- Template:Para – shorthand for both Template:Para and Template:Para; Template:Para yields to Template:Para and Template:Para; alias: Template:Para
- Template:Para – set background color for ISO week numbers; alias: Template:Para
Linking parameters
- Template:Para – various date component linking options:
d
– link days in calendar to calendar day of calendar month –[[December 25]]
m
– link month in calendar header to month article –[[December]] 2019
y
– link year in calendar header to year article –December [[2024]]
dm
– link to days and monthdy
– link to days and yearmy
– link to month and yearyes
– individually link all date componentsm&y
– stand-alone month calendars only; link month and year together as a single composite link –[[December 2024]]
dm&y
– stand-alone month calendars only; link to days and composite month/year
Link prefixes and suffixes
These parameters require Template:Para:
- Template:Para – prefix for all day, month, and year links enabled by Template:Para; yields to specific Template:Para parameters
- Template:Para – suffix for all day, month, and year links enabled by Template:Para; yields to specific Template:Para parameters
These parameters automatically set Template:Para to the appropriate value; override values assigned to Template:Para and Template:Para:
- Template:Para – prefix for day links
- Template:Para – prefix for month and composite month/year links
- Template:Para – prefix for year links
- Template:Para – suffix for day links
- Template:Para – suffix for month links and composite month/year links
- Template:Para – suffix for year links
For stand-alone month calendars only, links to previous- and next-month targets:
- Template:Para – accepts the single value
yes
; adds generic << and >> links to month header linked to the preceding and next month articles; automatically set if any of the following parameters are set:- Template:Para – prefix for previous-month link
- Template:Para – suffix for previous-month link
- Template:Para – prefix for next-month link
- Template:Para – 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:
- Template:Para – creates link to
[[An example page#April]]
- Template:Para – 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:
- Template:Para – creates link to
[[An example page/April]]
- Template:Para – 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