SiDateRangeFilterComponent documentation¶
import { SiDateRangeFilterComponent } from '@siemens/element-ng/date-range-filter'; Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| advancedLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.ADVANCED:Advanced` | label for the "advanced" switch |
| afterLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.AFTER:After` | label for the "After" toggle |
| applyLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.APPLY:Apply` | label for the "apply" switch |
| basicMode ¶ | "input" | "calendar" | 'calendar' | Determines whether to show input fields or a date-range calendar in basic mode. When time selection is enabled, this has no effect and input fields are always shown. |
| beforeLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.BEFORE:Before` | label for the "Before" toggle |
| dateLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.DATE:Date` | label for "Date" field / radio button |
| datepickerConfig ¶ | DatepickerInputConfig | undefined | Base configuration on how the dates should be displayed, parts of it may be overwritten internally. | |
| datePlaceholder ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.DATE_PLACEHOLDER:Select date` | Placeholder for date fields |
| enableTimeSelection ¶ | boolean | false | Determines if time is selectable or only dates |
| fromLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.FROM:From` | label for the "Reference point" title |
| hideAdvancedMode ¶ | boolean | false | Hides the advanced mode if input allows |
| nowLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.NOW:Now` | label for the "Now" checkbox |
| presetLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.PRESETS:Presets` | label for the "search" input |
| presetList ¶ | DateRangePreset[] | undefined | List of preset time ranges. When not present or empty, the preset section won't show | |
| presetSearch ¶ | boolean | true | Determines if there's a search field for the preset list |
| previewLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.PREVIEW:Preview` | label for the "Preview" title |
| rangerequired ¶ | DateRangeFilter | The filter range object | |
| rangeEndDateMissingLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.SELECT_RANGE_END:Select end date` | label for the "select end date" in preview |
| rangeLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.RANGE:Range` | label for the "Range" title |
| refLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.REF_POINT:Reference point` | label for the "Reference point" title |
| reverseInputFields ¶ | boolean | false | Reverses the order of the from/to fields |
| scrollStrategy ¶ | ScrollStrategy | defaultConnectedOverlayScrollStrategy() | Optional CDK scroll strategy used for the preset overlay. |
| searchLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.SEARCH:Search` | label for the "search" input |
| selectRangeLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.SELECT_RANGE_LABEL:Select date range` | label when range is not defined in the preview |
| showApplyButton ¶ | boolean | false | Determines whether to show the 'Apply' button |
| todayLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.TODAY:Today` | label for the "Today" checkbox |
| toLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.TO:To` | label for the "Reference point" title |
| unitLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.UNIT:Unit` | label for the "Unit" select |
| valueLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.VALUE:Value` | label for the "value" number input |
| withinLabel ¶ | TranslatableString | $localize`:@@SI_DATE_RANGE_FILTER.WITHIN:Within` | label for the "Within" toggle |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| applyClicked ¶ | void | Event fired when the apply button has been clicked |
| rangeChangerequired ¶ | DateRangeFilter | The filter range object |
Types Documentation¶
import type { DatepickerInputConfig } from '@siemens/element-ng/datepicker'; -
Similar to
dateTimeFormat, but used when only a date is displayed (e.g. whenshowTime === falseordisabledTime === true). Only numeric date formats are supported. -
A custom date/time format according the Angular date pipe (see https://angular.dev/api/common/DatePipe). Only numeric date formats are supported. The format is used to render the time of a date-time criterion. If not specified,
mediumTimeis used if theshowSecondsflag is true, otherwiseshortTimeas default. For the date-only case, 'shortDate' is used. -
Defines the time is disabled when visible. Will also be updated on user change. Default is
false.disabledTime?:
booleanInherited from DatepickerConfig¶ -
Text or translation key for the
disableddisable time. Default isIgnore time.disabledTimeText?:
TranslatableStringInherited from DatepickerConfig¶ -
Options to turn on date range selection.
enableDateRange?:
booleanInherited from DatepickerConfig¶ -
Text or translation key for the
enableddisable time. Default isConsider time.enabledTimeText?:
TranslatableStringInherited from DatepickerConfig¶ -
Consider time with minDate and maxDate
enableTimeValidation?:
booleanInherited from DatepickerConfig¶ -
Option to use two months view for date range picking.
enableTwoMonthDateRange?:
booleanInherited from DatepickerConfig¶ -
endTimeLabel?:
stringInherited from DatepickerConfig¶ -
hideLabels?:
booleanInherited from DatepickerConfig¶ -
Configuration for hiding week numbers. Default is
false.hideWeekNumbers?:
booleanInherited from DatepickerConfig¶ -
hoursAriaLabel?:
stringInherited from DatepickerConfig¶ -
hoursLabel?:
stringInherited from DatepickerConfig¶ -
hoursPlaceholder?:
stringInherited from DatepickerConfig¶ -
Hides disable time switch in the timepicker part and includes mandatory the time in the picker.
mandatoryTime?:
booleanInherited from DatepickerConfig¶ -
Maximal (latest) selectable date.
maxDate?:
DateInherited from DatepickerConfig¶ -
meridians?:
string[]Inherited from DatepickerConfig¶ -
meridiansAriaLabel?:
stringInherited from DatepickerConfig¶ -
meridiansLabel?:
stringInherited from DatepickerConfig¶ -
millisecondsAriaLabel?:
stringInherited from DatepickerConfig¶ -
millisecondsLabel?:
stringInherited from DatepickerConfig¶ -
millisecondsPlaceholder?:
stringInherited from DatepickerConfig¶ -
Minimal (earliest) selectable date.
minDate?:
DateInherited from DatepickerConfig¶ -
minutesAriaLabel?:
stringInherited from DatepickerConfig¶ -
minutesLabel?:
stringInherited from DatepickerConfig¶ -
minutesPlaceholder?:
stringInherited from DatepickerConfig¶ -
Only month and year are selectable.
onlyMonthSelection?:
booleanInherited from DatepickerConfig¶ -
secondsAriaLabel?:
stringInherited from DatepickerConfig¶ -
secondsLabel?:
stringInherited from DatepickerConfig¶ -
secondsPlaceholder?:
stringInherited from DatepickerConfig¶ -
Defines the timepicker milliseconds visibility . Default is
false.showMilliseconds?:
booleanInherited from DatepickerConfig¶ -
Defines the timepicker minutes visibility. Default is
true.showMinutes?:
booleanInherited from DatepickerConfig¶ -
Defines the timepicker seconds visibility . Default is
false.showSeconds?:
booleanInherited from DatepickerConfig¶ -
Defines the timepicker visibility. Default is
false.showTime?:
booleanInherited from DatepickerConfig¶ -
startTimeLabel?:
stringInherited from DatepickerConfig¶ -
Text or translation key for today button title. Default is
Today.todayText?:
TranslatableStringInherited from DatepickerConfig¶ -
Defines the starting day of the week. Default is
monday.weekStartDay?:
WeekStartInherited from DatepickerConfig¶
import type { DateRangePreset } from '@siemens/element-ng/date-range-filter'; import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';Represents a translatable string. This can either be a translation key, e.g. ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit. Equivalent to a normal string in usage and functionality.
import type { DateRangePresetCustom } from '@siemens/element-ng/date-range-filter';Advanced DateRageFilter preset with custom calculation
-
calculation custom calculation function
calculate:
(self: DateRangePresetCustom, currentRange: DateRangeFilter) => DateRangeFilter¶ -
translation key for label
-
Whether this should show only when time support is enabled
import type { WeekStart } from '@siemens/element-ng/datepicker'; import type { DatepickerConfig } from '@siemens/element-ng/datepicker'; -
Defines the time is disabled when visible. Will also be updated on user change. Default is
false. -
Text or translation key for the
disableddisable time. Default isIgnore time. -
Options to turn on date range selection.
-
Text or translation key for the
enableddisable time. Default isConsider time. -
Consider time with minDate and maxDate
-
Option to use two months view for date range picking.
-
Configuration for hiding week numbers. Default is
false. -
Hides disable time switch in the timepicker part and includes mandatory the time in the picker.
-
Maximal (latest) selectable date.
-
Minimal (earliest) selectable date.
-
Only month and year are selectable.
-
Defines the timepicker milliseconds visibility . Default is
false. -
Defines the timepicker minutes visibility. Default is
true. -
Defines the timepicker seconds visibility . Default is
false. -
Defines the timepicker visibility. Default is
false. -
Text or translation key for today button title. Default is
Today. -
Defines the starting day of the week. Default is
monday.
Except where otherwise noted, content on this site is licensed under MIT License.