getDateFilterTitleUsingTranslator()
Beta API. Mostly stable, but details may change in a minor release, outside SemVer. See API maturity.
Gets the filter title using provided intl object.
getDateFilterTitleUsingTranslator: (filter: DateFilterOption, translator: IDateAndMessageTranslator, labelMode: DateFilterLabelMode, dateFormat?: string) => string
Parameters
Parameter | Type | Description |
|---|---|---|
filter | ||
translator | ||
labelMode | ||
dateFormat | string | (Optional) |
Returns
string
Representation of the filter (e.g. “My preset”, “From 2 weeks ago to 1 week ahead”)
Remarks
In addition to the base date filter representation, this function also decorates the title based on empty values handling:
- For “All time” with excluded empty values (
emptyValueHandling === "exclude"), returns"All time except empty values". - For any non-“All time” option with included empty values (emptyValueHandling === "include"), appends", empty value"to the base representation.
The dedicated “Empty values” preset is represented by its own title and is not further decorated.