Jump to content

Module:Calendar widget/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Trappist the monk (talk | contribs) at 15:44, 7 July 2019 (Linking parameters). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

{{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 a monthly calendar in the year specified by |year=; accepts a variety values:
    numbers 1 to 12 – 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 this current month
    last – display the month that occurs before the present month
    next – display the month that occurs after the present month
  • |iso= – accepts the single value yes; calendar renders in ISO week format (Monday through Sunday)
  • |iso-wk= – accepts the single value yes; 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 page
    right – at the right page margin
  • |show-today= – accepts the single value yes; 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 to calendar day of calendar month
    m – link to month article
    y – link to year article
    dm – link to days and month
    dy – link to days and year
    my – link to month and year
    yes – link all date components
  • |lk_pref_mprev= – prefix for previous-month link; for subsection of the current page set |lk_pref_mprev=#; for subpage of the current parent page use |lk_pref_mprev=../
  • |lk_pref_mnext= – prefix for next-month link; for subsection of the current page set |lk_pref_mnext=#; for subpage of the current parent page use |lk_pref_mnext=../
    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