matchDateFilterToDateFilterOption()
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Tries to match a preset or a form with the provided value. Prioritizes presets over forms.
export declare function matchDateFilterToDateFilterOption(dateFilter: DashboardDateFilterOfAnyType | undefined, availableOptions: IDateFilterOptionsByType): IDateFilterOptionInfo;
Parameters
Parameter | Type | Description |
|---|---|---|
dateFilter | DashboardDateFilterOfAnyType | undefined | value to match against |
availableOptions | date options available |
Returns
Remarks
Whole periods are matched to the absolute form, days of the deprecated absolute filter with granularity to days of the absolute form. Throws on a parameterized date filter, which date filters do not support yet.