Excerpt |
---|
|
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.
...
The view offset can be set programmatically (if you’re wrapping the component) through the view-offset viewOffset property. The property expects a number of days, by which to offset the start of the view.
Code Block |
---|
|
<B25:multiScheduleWrapper
view-offsetviewOffset="7"
... (set other properties here)
/> |
Code Block |
---|
|
<B25:scheduleWrapper
view-offsetviewOffset="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 |
---|
|
<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> |