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 Implements SiFormItemControl |
| id ¶ | string | `__si-date-range-${SiDateRangeComponent.idCounter++}` | The actual id of the control that should be used in the 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¶
Similar to dateFormat ? : 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, dateTimeFormat ? : Defines the time is disabled when visible. Will also be updated on user change. Default is disabledTime ? : Text or translation key for the disabledTimeText ? : Options to turn on date range selection. enableDateRange ? : Text or translation key for the enabledTimeText ? : Consider time with minDate and maxDate enableTimeValidation ? : Option to use two months view for date range picking. enableTwoMonthDateRange ? : endTimeLabel ? : hideLabels ? : Configuration for hiding week numbers. Default is hideWeekNumbers ? : hoursAriaLabel ? : hoursLabel ? : hoursPlaceholder ? : Hides disable time switch in the timepicker part and includes mandatory the time in the picker. mandatoryTime ? : Maximal (latest) selectable date. maxDate ? : meridians ? : meridiansAriaLabel ? : meridiansLabel ? : millisecondsAriaLabel ? : millisecondsLabel ? : millisecondsPlaceholder ? : Minimal (earliest) selectable date. minDate ? : minutesAriaLabel ? : minutesLabel ? : minutesPlaceholder ? : Only month and year are selectable. onlyMonthSelection ? : secondsAriaLabel ? : secondsLabel ? : secondsPlaceholder ? : Defines the timepicker milliseconds visibility . Default is showMilliseconds ? : Defines the timepicker minutes visibility. Default is showMinutes ? : Defines the timepicker seconds visibility . Default is showSeconds ? : Defines the timepicker visibility. Default is showTime ? : startTimeLabel ? : Text or translation key for today button title. Default is todayText ? : Defines the starting day of the week. Default is weekStartDay ? : import type { DatepickerInputConfig } from '@siemens/element-ng/datepicker';
dateTimeFormat, but used when only a date is displayed (e.g. when showTime === false or disabledTime === true). Only numeric date formats are supported.string ¶ mediumTime is used if the showSeconds flag is true, otherwise shortTime as default. For the date-only case, 'shortDate' is used.string ¶ false.boolean Inherited from DatepickerConfig ¶ disabled disable time. Default is Ignore time.TranslatableString Inherited from DatepickerConfig ¶ boolean Inherited from DatepickerConfig ¶ enabled disable time. Default is Consider time.TranslatableString Inherited from DatepickerConfig ¶ boolean Inherited from DatepickerConfig ¶ boolean Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ boolean Inherited from DatepickerConfig ¶ false.boolean Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ boolean Inherited from DatepickerConfig ¶ Date Inherited from DatepickerConfig ¶ string[] Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ Date Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ boolean Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ false.boolean Inherited from DatepickerConfig ¶ true.boolean Inherited from DatepickerConfig ¶ false.boolean Inherited from DatepickerConfig ¶ false.boolean Inherited from DatepickerConfig ¶ string Inherited from DatepickerConfig ¶ Today.TranslatableString Inherited from DatepickerConfig ¶ monday.WeekStart Inherited from DatepickerConfig ¶
Represents a translatable string. This can either be a translation key, e.g. import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';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.
Backdrop : Detach : Escape : Select : import { CloseCause } from '@siemens/element-ng/datepicker';
CloseCause.Backdrop = 'backdrop' ¶ CloseCause.Detach = 'detach' ¶ CloseCause.Escape = 'escape' ¶ CloseCause.Select = 'select' ¶
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. Generated ID that the SiFormItemComponent will assign to the element containing the error messages. Implementations of SiFormItemControl must generate this ID and assign it to the errormessageId : The actual id of the control that should be used in the id ? : If the control is meant to be used a checkbox. This affects the label positioning. isFormCheck ? : 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. labelledby ? : import type { SiFormItemControl } from '@siemens/element-ng/form';
aria-describedby attribute of their focusable elements.string | Signal<string> ¶ for attribute of a label.string | Signal<string | undefined> ¶ boolean ¶ string | Signal<string | undefined> | null ¶
import type { WeekStart } from '@siemens/element-ng/datepicker';
Defines the time is disabled when visible. Will also be updated on user change. Default is disabledTime ? : Text or translation key for the Options to turn on date range selection. enableDateRange ? : Text or translation key for the Consider time with minDate and maxDate Option to use two months view for date range picking. endTimeLabel ? : hideLabels ? : Configuration for hiding week numbers. Default is hideWeekNumbers ? : hoursAriaLabel ? : hoursLabel ? : hoursPlaceholder ? : Hides disable time switch in the timepicker part and includes mandatory the time in the picker. mandatoryTime ? : Maximal (latest) selectable date. meridiansLabel ? : millisecondsLabel ? : Minimal (earliest) selectable date. minutesAriaLabel ? : minutesLabel ? : Only month and year are selectable. secondsAriaLabel ? : secondsLabel ? : Defines the timepicker milliseconds visibility . Default is showMilliseconds ? : Defines the timepicker minutes visibility. Default is showMinutes ? : Defines the timepicker seconds visibility . Default is showSeconds ? : Defines the timepicker visibility. Default is startTimeLabel ? : Text or translation key for today button title. Default is Defines the starting day of the week. Default is weekStartDay ? : import type { DatepickerConfig } from '@siemens/element-ng/datepicker';
false.boolean ¶ disabled disable time. Default is Ignore time.boolean ¶ enabled disable time. Default is Consider time.string ¶ boolean ¶ false.boolean ¶ string ¶ string ¶ string ¶ boolean ¶ string ¶ string ¶ string ¶ string ¶ string ¶ string ¶ false.boolean ¶ true.boolean ¶ false.boolean ¶ false.string ¶ Today.monday.WeekStart ¶
Except where otherwise noted, content on this site is licensed under MIT License.