SiDateInputDirective documentation¶
import { SiDateInputDirective } from '@siemens/element-ng/datepicker';Base directive for date input fields.
Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| disabled ¶ | boolean | false | Whether the date range input is disabled. |
| errormessageId ¶ | string | `${this.id()}-errormessage` | This ID will be bound to the Implements SiFormItemControl |
| id ¶ | string | `si-date-input-${SiDateInputDirective.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. |
| siDatepickerConfig ¶ | DatepickerInputConfig | undefined | {} | Configuration object for the datepicker. |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| dateChangeprotected ¶ | Date | undefined | Emits a new |
| siDatepickerConfigChange ¶ | DatepickerInputConfig | undefined | Configuration object for the datepicker. |
| siDatepickerDisabledTime ¶ | 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. |
| stateChange ¶ | void | Emits an event on state changes e.g. readonly, disable, ... . |
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 { 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.
-
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
aria-describedbyattribute of their focusable elements.errormessageId:
readonlystring | Signal<string>¶ -
The actual id of the control that should be used in the
forattribute of a label.id?:
readonlystring | Signal<string | undefined>¶ - readonly
If the control is meant to be used a checkbox. This affects the label positioning.
-
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?:
readonlystring | Signal<string | undefined> | null¶
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 { 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.