getDefaultCalendarTab()
Home > @gooddata/sdk-ui-filters > getDefaultCalendarTab
getDefaultCalendarTab() function
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Determine the default calendar tab based on active calendars configuration.
Signature:
export declare function getDefaultCalendarTab(activeCalendars?: IActiveCalendars, currentPreset?: DateFilterOption): CalendarTabType;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
activeCalendars |
(Optional) Optional active calendars configuration from workspace settings | |
|
currentPreset |
(Optional) The currently selected date filter option |
Returns:
The tab that should be selected by default
Remarks
Priority: 1. If current preset uses fiscal-only granularity → fiscal tab 2. If current preset uses standard-only granularity → standard tab 3. If current preset uses shared granularity (week, day, etc.) → use settings default 4. Fall back to "standard" if no configuration