Skip to content

SiDateRangeComponent documentation

import { SiDateRangeComponent } from '@siemens/element-ng/datepicker';

Input Properties

Name Type Default Description
ariaLabelCalendarButton
TranslatableString $localize`:@@SI_DATEPICKER.CALENDAR_TOGGLE_BUTTON:Open calendar`

Aria label of the date-range calendar toggle button.

autoClose
boolean false

Automatically close overlay on date selection.

disabled
boolean false

Whether the date range input is disabled.

endDatePlaceholder
TranslatableString $localize`:@@SI_DATEPICKER.END_DATE_PLACEHOLDER:End date`

Placeholder of the end date input.

endTimeLabel
TranslatableString $localize`:@@SI_DATEPICKER.END_TIME_LABEL:To`

Form label of the start timepicker.

errormessageId
string `${this.id()}-errormessage`

This ID will be bound to the aria-describedby attribute of the date-range. Use this to reference the element containing the error message(s) for the date-range. It will be picked by the SiFormItemComponent if the date-range is used inside a form item.

Implements SiFormItemControl

id
string `__si-date-range-${SiDateRangeComponent.idCounter++}`

The actual id of the control that should be used in the for attribute of a label.

Implements SiFormItemControl

readonly
boolean false

Whether the date range input is readonly.

scrollStrategy
ScrollStrategy defaultConnectedOverlayScrollStrategy()

Optional CDK scroll strategy used for the datepicker overlay.

siDatepickerConfig
DatepickerInputConfig { enableDateRange: true }

Date range component configuration.

startDatePlaceholder
TranslatableString $localize`:@@SI_DATEPICKER.START_DATE_PLACEHOLDER:Start date`

Placeholder of the start date input.

startTimeLabel
TranslatableString $localize`:@@SI_DATEPICKER.START_TIME_LABEL:From`

Form label of the start timepicker.

value
DateRange | undefined

Set the date-range object displayed in the control. The input can be used if the control is used outside Angular forms.

Output Properties

Name Type Description
disabledTimeChange
boolean

Emits an event to notify about disabling the time from the range picker. When time is disable, we construct a pure date objects in UTC 00:00:00 time.

siDatepickerClose
CloseCause

Output event on closing datepicker e.g. by clicking backdrop or escape key.

siDatepickerConfigChange
DatepickerInputConfig

Date range component configuration.

siDatepickerRangeChange
DateRange | undefined

Emits on the date range value changes.

valueChange
DateRange | undefined

Set the date-range object displayed in the control. The input can be used if the control is used outside Angular forms.

Attributes and Methods

Name Type Default Description
(readonly)labelledby
string ...

ID that should be assigned to the label element inside the SiFormItemComponent.

If the target control is not of type input, select or button, it cannot be referenced by a label. Instead, aria-labelledby must be used to create a reference to a label. In such a case, an implementation of SiFormItemControl must provide the id of the label in labelledby. SiFormItemComponent will apply the id to the label so that it can be used inside the control to reference it in the aria-labelledby attribute.

Implements SiFormItemControl

Types Documentation

import type { DatepickerInputConfig } from '@siemens/element-ng/datepicker';
Properties

import type { DateRange } from '@siemens/element-ng/datepicker';

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 { CloseCause } from '@siemens/element-ng/datepicker';
Members

import type { SiFormItemControl } from '@siemens/element-ng/form';

Common interface for form item controls. Controls that should be connected to SiFormItemComponent must implement this interface and must be provided using the SI_FORM_ITEM_CONTROL token.

Properties

WeekStart

'monday' | 'saturday' | 'sunday' | undefined
type alias
import type { WeekStart } from '@siemens/element-ng/datepicker';

import type { DatepickerConfig } from '@siemens/element-ng/datepicker';
Properties


Except where otherwise noted, content on this site is licensed under MIT License.