v7.3.0

YearView
Widget

This is normally used as a mode of a Calendar (as seen in the live demo below) but may be used standalone as a regular Widget.

As a standalone widget, it will lack the capabilities of the Calendar class, such as keyboard-based event to event navigation and drag/drop features. As seen in this demo:

A Panel which displays a year's worth of months with days which have events highlighted.

Useful configs

Config Description
year The year to display
dayCellRenderer Custom renderer for day cells
showEvents How to indicate event presence (heatmap, dots, count)
sixWeeks Show six week rows per month or fit to content

See also

  • Calendar — The main Calendar that hosts this view
  • MonthGrid — Subclass showing a grid of monthly event lists
No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • A date which specifies the year to display. All types of calendar view have a date config which they use to set their visible date range according to their configuration and type.

  • The class name to add to calendar cells which are in the previous or next month.

  • showEvents : Boolean/'heatmap'/'dots'heatmap

    How to indicate the presence of events for a date. The default is heatmap which adds classes depending on how many events intersect the date.Values may be:

    • false - Do not show events in cells.
    • true - Show a heatmap of colours the intensity of which indicates event load.
    • 'heatmap' - Show a heatmap of colours the intensity of which indicates event load.
    • 'count' - Show a themeable badge containing the event count for a date.
    • 'dots' - Show small event-coloured bullets up to a maximum of eventDots.max to indicate event presence. to indicate event presence.

    Has a corresponding runtime showEvents property.

  • By default, all months show six week rows. Pass false to only render as many rows as needed.

  • The year to display

Properties

Properties are getters/setters or publicly accessible variables on this class
  • isYearView : Booleantrue
    READONLY
    static
    ADVANCED
    Identifies an object as an instance of YearView class, or subclass thereof.
  • Returns the resource associated with this year view when used inside a ResourceView

  • showEvents : Boolean/'heatmap'/'dots'heatmap

    How to indicate the presence of events for a date. The default is heatmap which adds classes depending on how many events intersect the date.Values may be:

    • false - Do not show events in cells.
    • true - Show a heatmap of colours the intensity of which indicates event load.
    • 'heatmap' - Show a heatmap of colours the intensity of which indicates event load.
    • 'count' - Show a themeable badge containing the event count for a date.
    • 'dots' - Show small event-coloured bullets up to a maximum of eventDots.max to indicate event presence. to indicate event presence.

    Has a corresponding showEvents config.

  • startDate : Date
    internal
    READONLY

    For a consistent API, allow startDate to set the year

  • isYearView : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of YearView class, or subclass thereof.

Events

Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

Event handlers

Event handlers are callbacks called as a result of certain actions in this class

Type definitions

CSS variables

CSS variables that can be set to adjust appearance
Name Description
--b-year-view-background Background color for the year view.
--b-year-view-cell-background Background color for the day cells in the year view.
--b-year-view-cell-color Color for the day cells in the year view.
--b-year-view-column-gap Gap between month columns in the year view.
--b-year-view-content-padding Padding for the content in the year view.
--b-year-view-day-cell-color Color of the day cells in the year view.
--b-year-view-day-cell-size Size of the day cells in the year view.
--b-year-view-dragproxy-background Background for the drag proxy in the year view.
--b-year-view-font-size Font size for the year view.
--b-year-view-font-size-big Font size when the year view is in big mode (responsive).
--b-year-view-foreground-color Foreground color for the year view.
--b-year-view-foreground-font-weight Font weight for the foreground elements in the year view.
--b-year-view-heatmap-background Heatmap background (a shade of the heatmaps color)
--b-year-view-month-max-width Maximum width for a month view in the year view.
--b-year-view-month-min-width Minimum width for a month view in the year view.
--b-year-view-month-name-cell-background Background color for the month names in the year view.
--b-year-view-month-name-cell-color Color for the month names in the year view.
--b-year-view-month-name-font-size Font size for the month names in the year view.
--b-year-view-month-name-max-width Maximum width for the month name in the year view.
--b-year-view-other-month-cell-color Color for the day cells of other months in the year view.
--b-year-view-row-gap Gap between month rows in the year view.
--b-year-view-tentative-event-color Color for tentative events in the year view.
--b-year-view-tentative-event-color2 Secondary color for tentative events in the year view.
--b-year-view-today-cell-background Background color for the "today" cell in the year view.
--b-year-view-today-cell-border Border for the "today" cell in the year view.
--b-year-view-today-cell-color Color for the "today" cell in the year view.
--b-year-view-today-cell-font-weight Font weight for the "today" cell in the year view.
--b-year-view-week-cell-background Background color for week numbers in the year view.
--b-year-view-week-cell-color Color for week numbers in the year view.
Hovered
--b-year-view-cell-hover-background Background color for the day cells on hover in the year view.
--b-year-view-cell-hover-color Color for the day cells on hover in the year view.
--b-year-view-events-hover-blend-mode Blend mode for events on hover in the year view.
--b-year-view-heatmap-hover-background Heatmap hover background (a shade of the heatmaps color)
--b-year-view-month-name-cell-hover-background Background color for the month names on hover in the year view.
--b-year-view-month-name-cell-hover-color Color for the month name on hover in the year view.
--b-year-view-week-cell-hover-background Background color for week numbers on hover in the year view.
--b-year-view-week-cell-hover-color Color for week numbers on hover in the year view.
type: yearview

Source path

Calendar/widget/YearView.js

Contents