v7.3.0

ViewPresetCombo
Widget

A combo for selecting ViewPreset for Scheduler and Gantt. Lets the user select between specified presets available.

By default, a preset change by the ViewPresetCombo will result in that the startDate will be calculated to the beginning of the mainUnit of the viewportCenterDate. If the ViewPreset has a start configured, this will be added to the calculation. The endDate will then be calculated by adding the ViewPreset's defaultSpan to the startDate. Set useFixedDuration to false to prevent this behaviour.

Add it to the component's toolbar to connect it automatically:

new Scheduler({
   tbar : {
       viewPresetCombo: {
           type: 'viewpresetcombo',
           width: '7em'
       }
   }
});

Or specify which Scheduler, SchedulerPro or Gantt component instance it should connect to the client config:

const scheduler = new Scheduler({ ... });
const viewPresetCombo = new ViewPresetCombo({
    appendTo : 'someElementClassName',
    client   : scheduler
});

By default, the following presets are shown in the combo:

Changing selectable presets

To change the default selectable presets specify an array of preset ids. The presets specified must be available to the client.

viewPresetCombo: {
   presets: ['weekAndDay', 'dayAndMonth', 'myCustomPreset']
}

NOTE: The selectable presets will be arranged in the order provided in the presets config.

See also

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • If not added to a toolbar, provide a Scheduler, SchedulerPro or Gantt component instance to which the ViewPresetCombo should be connected.

  • An array containing string ViewPreset ids available for selection. The specified presets must be available for the client (Scheduler, SchedulerPro or Gantt) for it to work properly. The selectable presets will be arranged in the order provided here.

Properties

Properties are getters/setters or publicly accessible variables on this class
type: viewpresetcombo

Source path

Scheduler/widget/ViewPresetCombo.js

Contents