Input Datepicker: API Table
class: LionInputDatepicker, lion-input-datepicker
Fields
| Name | Privacy | Type | Default | Description | Inherited From |
|---|---|---|---|---|---|
calendarHeading | public | string | The heading to be added on top of the calendar overlay. Naming chosen from an Application Developer perspective. For a Subclasser ‘calendarOverlayHeading’ would be more appropriate. | ||
config | public | Partial<OverlayConfig> | {} | Configure the many options of the `OverlayController` | OverlayMixin |
formatter | public | formatDate | LionInputDate | ||
modelValue | public | LionInputDate | |||
opened | public | boolean | false | If you add the opened attribute a dialog will be opened on page load. The invoker can be left out in case the user does not need to be able to reopen the dialog. | OverlayMixin |
parser | public | LionInputDate | |||
placeholder | public | string | '' | LionInput | |
readOnly | public | boolean | false | A Boolean attribute which, if present, indicates that the user should not be able to edit the value of the input. The difference between disabled and readonly is that read-only controls can still function, whereas disabled controls generally do not function as controls until they are enabled. (From: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) | LionInput |
slots | public | LionInput | |||
type | public | string | 'text' | LionInput | |
_calendarInvokerSlot | protected | string | 'suffix' | The slot to put the invoker button in. Can be ‘prefix’, ‘suffix’, ‘before’ and ‘after’. Default will be ‘suffix’. | |
_calendarNode | protected | LionCalendar | |||
_feedbackConditionMeta | protected | LionField | |||
_focusableNode | protected | LionField | |||
_focusCentralDateOnCalendarOpen | protected | boolean | true | ||
_hideOnUserSelect | protected | boolean | true | ||
_inputNode | protected | HTMLInputElement | LionInput | ||
_invokerNode | protected | ||||
_isEditingTextField | protected | ||||
_isHandlingCalendarUserInput | protected | boolean | false | ||
_overlayBackdropNode | protected | OverlayMixin | |||
_overlayContentNode | protected | OverlayMixin | |||
_overlayContentWrapperNode | protected | OverlayMixin | |||
_overlayInvokerNode | protected | The node that opens/closes this overlay. Resolved in a stable, declarative way (independent of the exact DOM order) by looking, in order, for: 1. a child with `[slot=“invoker”]` 2. any element in the same root that opts in via `[data-invoker]` and references this host by id (`for=“<id>”`) 3. a preceding sibling that opts in via `[data-invoker]` | OverlayMixin | ||
_overlayReferenceNode | protected | OverlayMixin | |||
_syncOnUserSelect | protected | boolean | true |
Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
|---|---|---|---|---|---|
clear | public | Clears modelValue. Interaction states are not cleared (use resetInteractionState for this) | LionField | ||
close | public | Hides the overlay | OverlayMixin | ||
deserializer | public | serializedValue: string | LionInputDate | ||
open | public | Shows the overlay | OverlayMixin | ||
repositionOverlay | public | Sometimes it’s needed to recompute Popper position of an overlay, for instance when we have an opened combobox and the surrounding context changes (the space consumed by the textbox increases vertically) | OverlayMixin | ||
reset | public | Resets modelValue to initial value. Interaction states are cleared | LionField | ||
resetInteractionState | public | LionField | |||
serializer | public | modelValue: Date | LionInputDate | ||
toggle | public | Toggles the overlay | OverlayMixin | ||
_calendarTemplate | protected | Subclassers can replace this with their custom extension of LionCalendar, like `<my-calendar id=“calendar”></my-calendar>` | |||
_defineOverlay | protected | { contentNode, invokerNode, referenceNode, backdropNode, contentWrapperNode }, config: DefineOverlayConfig | OverlayController | OverlayMixin | |
_defineOverlayConfig | protected | Object | OverlayMixin | ||
_getInvokerNode | protected | Element|null | OverlayMixin | ||
_invokerIconTemplate | protected | Subclassers can replace this with their custom extension invoker icon | |||
_invokerTemplate | protected | Subclassers can replace this with their custom extension invoker, like `<my-button><calendar-icon></calendar-icon></my-button>` | |||
_isPermanentlyDisconnected | protected | When we’re moving around in dom, disconnectedCallback gets called. Before we decide to teardown, let’s wait to see if we were not just moving nodes around. | Promise<boolean> | OverlayMixin | |
_onCalendarOverlayOpened | protected | Lifecycle callback for subclassers | |||
_onCalendarUserSelectedChanged | protected | Triggered when a user selects a date from the calendar overlay | { target: { selectedDate } }, opts: { target: { selectedDate: Date }} | ||
_onChange | protected | Dispatches custom bubble event | ev: Event= | LionField | |
_onValidatorUpdated | protected | Responsible for listening param change event and sync the calendar dates with the updated validator params | e: Event|CustomEvent, metaData: {validator: Validator} | ||
_overlayFrameTemplate | protected | ||||
_overlayTemplate | protected | Defining this overlay as a templates from OverlayMixin this is our source to give as .contentNode to OverlayController. Important: do not change the name of this method. | |||
_reflectBackOn | protected | ||||
_setOpenedWithoutPropertyEffects | protected | When the opened state is changed by an Application Developer,cthe OverlayController is requested to show/hide. It might happen that this request is not honoured (intercepted in before-hide for instance), so that we need to sync the controller state to this webcomponent again, preventing eternal loops. | newOpened: boolean | OverlayMixin | |
_setupOpenCloseListeners | protected | OverlayMixin | |||
_setupOverlayCtrl | protected | OverlayMixin | |||
_teardownOpenCloseListeners | protected | OverlayMixin | |||
_teardownOverlayCtrl | protected | OverlayMixin |
Events
| Name | Type | Description | Inherited From |
|---|---|---|---|
opened-changed | CustomEvent | OverlayMixin | |
user-input-changed | Event | LionField |
Attributes
| Name | Field | Inherited From |
|---|---|---|
calendar-heading | calendarHeading | |
opened | opened | OverlayMixin |
modelValue | modelValue | LionInputDate |
readonly | readOnly | LionInput |
type | type | LionInput |
placeholder | placeholder | LionInput |