Document toolboxDocument toolbox

3.3.4. Time ranges

image-20240722-133652.png

Time ranges are background "events" that will display a small bar on the right side of the day in the grid. They can be given a color, a custom class, and configured in other ways to change their appearance.

Time ranges

image-20240722-133923.png

The required attributes for a time range are a name and a start date. If the end date is empty it will be shown as a line.

 

Styling

There are various ways to style an event: by using a dynamic class or by using the default colors included in the widget.

For an example see: event styling

Using the default styling options

Colors

The default event color can be chosen and then overridden by the event color, if desired. The event color can also be left blank. If left blank, the default event color will be applied. To apply a event color, you can use a string or the provided enumeration ENUM_Color found in the resources folder of the scheduler module. Like so:

getKey(BizzomateCalendar.ENUM_Color.cyan)

Or when you have an attribute on your object that uses the color enum:

getKey($currentObject/EventColor)

Using a dynamic class to style your events

You can define a class to style your events in any way you want. You can see _time-ranges.scss in the module themesource for an example on how to create a hatch.

Recurrance rules

You can specify recurrence rules for your timespans. For instance, you can make a timespan repeat every day of the week, only on Sunday, etc. See https://bizzomate.atlassian.net/wiki/x/GAC0nw for details.

Â