Skip to content

SiDatepickerDirective documentation

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

Input Properties

NameTypeDefaultDescription
autoClose
boolean false

Automatically close overlay on date selection. Do not use this behavior with config showTime = true, because it will close the overlay when the user change one of the time units.

disabledinherited
boolean false

Whether the date range input is disabled.

Inherited from SiDateInputDirective

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

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

Inherited from SiDateInputDirective

Implements SiFormItemControl

idinherited
string `si-date-input-${SiDateInputDirective.idCounter++}`

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

Inherited from SiDateInputDirective

Implements SiFormItemControl

readonlyinherited
boolean false

Whether the date range input is readonly.

Inherited from SiDateInputDirective

siDatepickerConfiginherited
DatepickerInputConfig | undefined {}

Configuration object for the datepicker.

Inherited from SiDateInputDirective

siDatepickerScrollStrategy
ScrollStrategy defaultConnectedOverlayScrollStrategy()

Optional CDK scroll strategy used for the datepicker overlay.

Output Properties

NameTypeDescription
dateChangeinheritedprotected
Date | undefined

Emits a new date value on input field value changes.

Inherited from SiDateInputDirective

siDatepickerClose
CloseCause

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

siDatepickerConfigChangeinherited
DatepickerInputConfig | undefined

Configuration object for the datepicker.

Inherited from SiDateInputDirective

siDatepickerDisabledTimeinherited
boolean

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

Inherited from SiDateInputDirective

stateChangeinherited
void

Emits an event on state changes e.g. readonly, disable, ... .

Inherited from SiDateInputDirective

Attributes and Methods

NameTypeDescription
registerOnChange()inherited
(fn: any) => void

Inherited from SiDateInputDirective

Implements ControlValueAccessor

Parameters
  • The callback function to register

    fn: any

registerOnTouched()inherited
(fn: () => void) => void

Inherited from SiDateInputDirective

Implements ControlValueAccessor

Parameters
  • The callback function to register

    fn: () => void

registerOnValidatorChange()inherited
(fn: () => void) => void

Inherited from SiDateInputDirective

Implements Validator

Parameters
setDisabledState()inherited
(isDisabled: boolean) => void

Inherited from SiDateInputDirective

Implements ControlValueAccessor

Parameters
validate()inherited

Inherited from SiDateInputDirective

Implements Validator

Parameters
writeValue()inherited
(value?: string | Date | null) => void

Inherited from SiDateInputDirective

Implements ControlValueAccessor

Parameters

Types Documentation

import type { DatepickerInputConfig } from '@siemens/element-ng/datepicker';
Properties
import { CloseCause } 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.

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.