Document toolboxDocument toolbox

1.4.1. Custom navigation

Overview

Custom navigation can be used when the default navigation is not sufficient or when you need different functionality or a specific look and feel. This feature allows you to control the scheduler with regular Mendix components and actions in any way you require.

By using custom navigation, you can add your own buttons, dropdowns, or other components to the scheduler header. This allows for a customized user experience that is tailored to the needs of your application.

For an example see: custom navigation

Creating your own custom navigation

It’s very simpel to create your own custom navigation. Al you need to do is influence the start date and the selected view of the scheduler context.

Changing the visible time of the view

For instance if you want to create a next button in a day view all you’d have to do is:

addDays($SchedulerContext/StartDate, 1)

When flooring of dates is enabled the scheduler will automatically round the date to the closest major unit of time. E.g. in a day view this would be 00:00 (if no offset is applied). This way you don’t have to do any calculations to figure out what the start date should be for the first day of the week, month, year etc. would be.

Changing the view

To change the view all you have to do is change the SelectedView attribute of the scheduler context with the id of the view you want to change to. For instance:

'Week'

Using the custom header

The custom header can be enabled, providing a place to place Mendix widgets within the scheduler widget. The advantage of this is that you can use the class ".b-is-fetching" to style components that should render differently when the scheduler is loading new data.