Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Excerpt
hiddentrue

Add a View Offset to make it display a different time range.

You can add a View Offset to a Scheduler component to make it display a different time range. This is useful for example if you have a two-week Schedule, which you want to display in two separate one-week components on top of each other.

Info

If you are using this technique to display two components, be aware that dragging and dropping events between components does not currently work.

Accessibility

The view offset can be set programmatically (if you’re wrapping the component) through the viewOffset property. The property expects a number of days, by which to offset the start of the view.

Code Block
languagehtml
<B25:multiScheduleWrapper
    viewOffset="7"
    ... (set other properties here)
/>

Code Block
languagehtml
<B25:scheduleWrapper
    viewOffset="7"
    ... (set other properties here)
/>

Example

This example illustrates how to use viewOffset to display a two-week schedule as two one-week calendars on top of each other.

Code Block
languagehtml
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <!-- component showing the first week (no offset) -->
    <B25:multiScheduleWrapper
        recordId="{!v.recordId}"
        calendarName="Schedule"
        colors="B25__Colors__c"
        titles="Name"
    />
    <!-- component showing the second week (7 day offset) -->
    <B25:multiScheduleWrapper
        recordId="{!v.recordId}"
        calendarName="Schedule"
        colors="B25__Colors__c"
        titles="Name"
        viewOffset="7"
    />
</aura:component>

On this page

Table of Contents