SiDatepickerOverlayDirective documentation¶
import { SiDatepickerOverlayDirective } from '@siemens/element-ng/datepicker';Directive with the responsibility to open/close datepicker overlay.
Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| siDatepickerScrollStrategy ¶ | ScrollStrategy | defaultConnectedOverlayScrollStrategy() | Optional CDK scroll strategy used for the datepicker overlay. |
Output Properties¶
| Name | Type | Description |
|---|---|---|
| siDatepickerClose ¶ | CloseCause | Output event on closing datepicker e.g. by clicking backdrop or escape key. |
Attributes and Methods¶
| Name | Type | Description |
|---|---|---|
| closeAfterSelection() ¶ | () => void | Close overlay with cause select, which will recover the focus |
| closeOverlay() ¶ | () => undefined | Close datepicker. |
| contains() ¶ | (element: HTMLElement) => boolean | Indicate whether the HTML element is a child of the datepicker overlay. Parameters |
| focus() ¶ | (focus?: boolean = true) => this | Focus active cell in datepicker. Returns: current instance. |
| isShown() ¶ | Indicate the datepicker is visible. Returns: is visible. | |
| setInputs() ¶ | (inputs?: Partial<DatepickerInput>) => this | Set datepicker inputs Parameters
|
| showOverlay() ¶ | (focus?: boolean = false, inputs?: Partial<DatepickerInput>) => ComponentRef<SiDatepickerOverlayComponent> | Show datepicker overlay. Returns: create datepicker overlay instance |
Types Documentation¶
import { CloseCause } from '@siemens/element-ng/datepicker'; -
Backdrop:
CloseCause.Backdrop='backdrop'¶ -
Detach:
CloseCause.Detach='detach'¶ -
Escape:
CloseCause.Escape='escape'¶ -
Select:
CloseCause.Select='select'¶
DatepickerInput
{ config: DatepickerConfig; date: Date; dateRange: DateRange; rangeType: 'START' | 'END'; time12h: boolean; showTime: true; } ¶import type { DatepickerInput } 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.
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'; Except where otherwise noted, content on this site is licensed under MIT License.