# Class DateRangeFilterTileComponent
Date Range Filter Tile Component
# Example
<csdk-date-range-filter-tile
title="dateRangeFilterTileProps.title"
[attribute]="dateRangeFilterTileProps.attribute"
[filter]="dateRangeFilterTileProps.filter"
(filterChange)="dateRangeFilterTileProps.setFilter($event)"
/>
import { Component } from '@angular/core';
import { Filter, filterFactory } from '@sisense/sdk-data';
import * as DM from '../../assets/sample-healthcare-model';
@Component({
selector: 'app-filters',
templateUrl: './filters.component.html',
styleUrls: ['./filters.component.scss'],
})
export class FiltersComponent {
DM = DM;
dateRangeFilterTileProps = {
title: 'Range Filter',
attribute: DM.ER.Date.Years,
filter: filterFactory.dateRange(DM.ER.Date.Years),
setFilter({ filter }: { filter: Filter | null }) {
console.log(filter);
if (filter) {
this.filter = filter;
}
},
};
}
# Implements
AfterViewInit
OnChanges
OnDestroy
# Constructors
# constructor
new DateRangeFilterTileComponent(
sisenseContextService
,themeService
):DateRangeFilterTileComponent
Constructor for the DateRangeFilterTileComponent
.
# Parameters
Parameter | Type | Description |
---|---|---|
sisenseContextService | SisenseContextService | Sisense context service |
themeService | ThemeService | Theme service |
# Returns
# Properties
# Constructor
# sisenseContextService
sisenseContextService:
SisenseContextService
Sisense context service
# themeService
themeService:
ThemeService
Theme service
# Other
# attribute
attribute:
LevelAttribute
Date level attribute the filter is based on
# dataSource
dataSource:
DataSource
|undefined
Data source the query is run against - e.g. Sample ECommerce
If not specified, the query will use the defaultDataSource
specified in the parent Sisense Context.
# earliestDate
earliestDate:
string
|undefined
Earliest allowed date for selection.
If not specified, the earliest date of the target date-level attribute will be used.
# filter
filter:
Filter
Date range filter.
# filterChange
filterChange:
EventEmitter
<ArgumentsAsObject
< (filter
) =>void
, ["filter"
] > >
Callback function that is called when the date range filter object should be updated.
# lastDate
lastDate:
string
|undefined
Latest allowed date for selection.
If not specified, the latest date of the target date-level attribute will be used.
# title
title:
string
Filter tile title