v7.3.0

CalendarPanel

A Panel which displays a month of date cells.

This is a base class for UI widgets like DatePicker which need to display a calendar layout.

This widget is not intended to be used directly

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • The date which this CalendarPanel encapsulates.

    Has a corresponding runtime date property.

  • The DateHelper format string to format the day names in the header row above the calendar cells.

  • Configure this as true to disable pointer interaction with cells which are outside the range of the current month.

  • Configure as true to render Saturdays and Sundays as disabledDates.

  • The class name to add to disabled calendar cells.

  • Configure this as true to hide cells which are outside the range of the current month.

  • A Month Month utility object which encapsulates this Panel's month and provides contextual information and navigation services.

  • The class name to add to calendar cells which are nonWorkingDays.

  • Non-working days as an object where keys are day indices, 0-6 (Sunday-Saturday), and the value is true. Defaults to nonWorkingDays.

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

  • Configure as true to render past dates in a lighter text color.

    Has a corresponding runtime shadePastDates property.

  • Configure as true to show a week number column at the start of the calendar block.

    Has a corresponding runtime showWeekColumn property.

  • Configure as true to always show a six-week calendar.

  • The class name to add to the calendar cell which contains today's date.

  • The header text for the week number column, if shown.

    Has a corresponding runtime weekColumnHeader property.

  • The week start day, 0 meaning Sunday, 6 meaning Saturday. Defaults to weekStartDay.

  • The class name to add to calendar cells which are weekend dates.

Properties

Properties are getters/setters or publicly accessible variables on this class
  • Gets or sets the date that orientates the panel to display a particular month. Changing this causes the content to be refreshed.

    Has a corresponding date config.

  • Configure as true to render past dates in a lighter text color.

    Has a corresponding shadePastDates config.

  • Configure as true to show a week number column at the start of the calendar block.

    Has a corresponding showWeekColumn config.

  • startDate : Date
    READONLY

    The date of the first day cell in this panel. Note that this may not be the first of this panel's current month.

  • The number of rows displayed in this month. If sixWeeks is not set, this may be from 4 to 6.

  • The header text for the week number column, if shown.

    Has a corresponding weekColumnHeader config.

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

Functions

Functions are methods available for calling on the class
    • doRefresh( )
      private

      Implementation of the UI refresh.

    • Refreshes the UI after changing a config that would affect the UI.

    • The date which this CalendarPanel encapsulates. Setting this causes the content to be refreshed.

    Events

    Events are triggered for certain actions in this class and can be listened for to react to those actions in your code
    • Fires when this CalendarPanel refreshes.

    Event handlers

    Event handlers are callbacks called as a result of certain actions in this class
    • Called when this CalendarPanel refreshes.

    CSS variables

    CSS variables that can be set to adjust appearance
    Name Description
    --b-calendar-panel-cell-background Date cell background
    --b-calendar-panel-cell-display Display property for date cells
    --b-calendar-panel-cell-font-size Date cell font size
    --b-calendar-panel-cell-font-weight Date cell font-weight
    --b-calendar-panel-cell-padding Date cell padding
    --b-calendar-panel-color Date cell color
    --b-calendar-panel-day-color Color used for day name letters
    --b-calendar-panel-day-font-size Font-size used for day name letters and week numbers
    --b-calendar-panel-day-header-font-weight Font-weight used for day name letters
    --b-calendar-panel-disabled-cell-opacity Disabled date cell opacity
    --b-calendar-panel-gap Gap between day and date cells (must have a unit for calculations to work)
    --b-calendar-panel-non-working-cell-display Non-working day & date cell display
    --b-calendar-panel-other-month-color Other month (last dates of the month before, first dates of the month after) cell color
    --b-calendar-panel-week-number-color The color of text in week number cells
    --b-calendar-panel-week-number-display Display property for the week number column
    --b-calendar-panel-week-width Width of the week number column
    --b-calendar-panel-weeks-gap Gap between weeks. Also used as block padding for the weeks container to give even spacing

    Source path

    Core/widget/CalendarPanel.js

    Contents