v7.3.0

DayView
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.

A Panel which displays one or more columns of days with events for each day arranged in ascending time order in each column.

This view is not limited to showing a single day. The date and range or startDate and endDate may be configured to cover any range.

By default, a narrow band of whitespace is left on the inline-end side of day columns to allow the user to click or drag to create events. This gutter may be configured using the eventLayout's gutterWidth property as shown in the examples below.

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:

When using range, setting the date snaps the view to the start of a range (for example '1 week') which encapsulates the requested date.

When the startDate is changed dynamically, the duration remains the same.

This view can be configured to scroll to the specific time on first render, which defaults to 7 AM. This behavior is controlled by the visibleStartTime config.

A WeekView is a subclass of this view which is tied to showing weeks as defined by the weekStartDay.

By default, the view scrolls vertically to 7am on first render. This can be configured using the visibleStartTime config.

Keyboard shortcuts when focused inside a DayView (or WeekView)

  • - Move to the previous day.
  • - Move to the next day.
  • + - Zoom in (Increase hourHeight by 2).
  • - - Zoom out (Decrease hourHeight by 2).

Multi day events.

All day events, and multi day events are displayed in a row at the top.

Intraday events are arranged in ascending time order down day columns from the dayStartTime to the dayEndTime.

The showAllDayHeader config option can be used to not show multi day events at the top, but have them wrap across multiple day columns.

The following configs which apply to the all day row are passed into the configuration of the allDayEvents widget:

Event rendering can be customized using the eventRenderer method.

Useful configs

Config Description
dayStartTime Start hour of the visible time range
dayEndTime End hour of the visible time range
hourHeight Pixel height of one hour cell
allDayEvents Config for the all-day events row
eventLayout Layout strategy for overlapping events
visibleStartTime Initially visible scroll position

See also

  • Calendar — The main Calendar that hosts this view
  • WeekView — Subclass of DayView that shows a full week
  • CalendarRow — The all-day events row at the top of this view
  • CalendarDrag — Feature for drag-creating, moving, and resizing events
No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • noMatchingDates : String/DomConfigL{noMatchingDates}

    Text or HTML, or a DomConfig block to display when all dates in the range have been filtered out.

    Has a corresponding runtime noMatchingDates property.

  • Number of pixels to reduce the height of events by, to leave a gap between them.

  • Configure this as true to hide day columns which contain no events.

    Use with care. This may result in no day columns being rendered for completely empty time ranges.

    Has a corresponding runtime hideEmptyDays property.

  • The minimum height to which event blocks in a day cell may shrink. If an event has very short duration, whatever the hourHeight, and regardless of timeline zooming, the event block will never drop below this height.

    Has a corresponding runtime minEventHeight property.

  • The minimum height in pixels to allow a zoom request to zoom out to.

    Has a corresponding runtime minHourHeight property.

  • The event block height at which the event display rendition switches to "compact" mode with the name, then start time both on the top line with a slightly smaller font.

    Has a corresponding runtime shortEventHeight property.

  • Shows an all day header above the main schedule for All Day events. Set to false to not show all day, or multi-day events in an all day header, but to have them showing wrapping through the day cells.

Properties

Properties are getters/setters or publicly accessible variables on this class
  • isDayView : Booleantrue
    READONLY
    static
    ADVANCED
    Identifies an object as an instance of DayView class, or subclass thereof.
  • noMatchingDates : String/DomConfigL{noMatchingDates}

    Text or HTML, or a DomConfig block to display when all dates in the range have been filtered out.

    Has a corresponding noMatchingDates config.

  • If showAllDayHeader is not set to false, then this will be an instance of CalendarRow which encapsulates the all day events at the top of this view.

    Has a corresponding allDayEvents config.

  • cellMap : Map
    READONLY

    Yields a Map which contains the cell data for each date in the current view. This is a Map where the keys are the date strings in the format YYYY-MM-DD and the values are DayCell objects which contain the data for that cell.

  • A callback function, or the name of a function in the ownership hierarchy which an application may provide to filter out day columns for individual dates.

    Has a corresponding dateFilter config.

  • Configure this as true to hide day columns which contain no events.

    Use with care. This may result in no day columns being rendered for completely empty time ranges.

    Has a corresponding hideEmptyDays config.

  • A Scroller which encapsulates horizontal scrolling of the view in case a minDayWidth setting causes the days to overflow the available width.

  • The minimum height to which event blocks in a day cell may shrink. If an event has very short duration, whatever the hourHeight, and regardless of timeline zooming, the event block will never drop below this height.

    Has a corresponding minEventHeight config.

  • The minimum height in pixels to allow a zoom request to zoom out to.

    Has a corresponding minHourHeight config.

  • The OverflowPopup instance that the allDayEvents may show when events for one day overflow the available space.

    Has a corresponding overflowPopup config.

  • Returns the resource associated with this day view when used inside a ResourceView

  • The event block height at which the event display rendition switches to "compact" mode with the name, then start time both on the top line with a slightly smaller font.

    Has a corresponding shortEventHeight config.

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

Functions

Functions are methods available for calling on the class

    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-day-view-all-day-height-transition-duration Transition duration for the height of all-day view.
    --b-day-view-background Background color for the day view.
    --b-day-view-body-background Background color for the body of an event in the day view.
    --b-day-view-border-color Border color for the day view.
    --b-day-view-day-change-line-color Color of the day change line when dayStartShift is used
    --b-day-view-event-body-padding Padding for the event body in the day view.
    --b-day-view-event-border-inline-start-color Color of the border at the start of the event in the day view.
    --b-day-view-event-border-inline-start-width Width of the border at the start of the event in the day view.
    --b-day-view-event-border-radius Border radius for events in the day view.
    --b-day-view-event-color Default color for events in the day view.
    --b-day-view-event-desc-line-height Line height for the event description in the day view.
    --b-day-view-event-name-line-height Line height for the event name in the day view.
    --b-day-view-foreground-color Foreground color for the day view.
    --b-day-view-half-hour-line-color Color for half-hour lines in the day view.
    --b-day-view-hour-line-color Color for hour lines in the day view.
    --b-day-view-inset-background Background color for insets in the day view.
    --b-day-view-non-working-day-background Background for non-working days in the day view.
    --b-day-view-outside-core-hours-color Color for outside core hours in the day view.
    --b-day-view-split-width Width of the split line in the day view.
    --b-day-view-time-axis-color Color for the time axis in the day view.
    --b-day-view-time-axis-hour-color Color for the hour markers on the time axis in the day view.
    --b-day-view-time-indicator-color Color for the current time indicator in the day view.
    --b-day-view-today-background Background color for today in the day view.
    Focused
    --b-day-view-focus-outline-color Color of the focus outline for an event in the day view, when using keyboard navigation.
    Hovered
    --b-day-view-body-hover-mask-color Color used to darken the body of an event on hover in the day view.
    --b-day-view-event-hover-body-background Background color for the body of an hovered event in the day view.
    --b-day-view-resource-avatar-hover-scale Scale factor for resource avatars on hover in the day view.
    Selected
    --b-day-view-body-selected-mask-color Color used to darken the body of an event using custom coloring when selected in the day view.
    --b-day-view-event-selected-body-background Background color for the body of a selected event in the day view.
    --b-day-view-event-selected-color Text color for an event in the day view when selected
    type: dayview

    Source path

    Calendar/widget/DayView.js

    Contents