Search

Find components, guides, and documentation

Input Datepicker: API Table

class: LionInputDatepicker, lion-input-datepicker

Fields

NamePrivacyTypeDefaultDescriptionInherited From
calendarHeadingpublicstringThe 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.
configpublicPartial<OverlayConfig>{}Configure the many options of the `OverlayController`OverlayMixin
formatterpublicformatDateLionInputDate
modelValuepublicLionInputDate
openedpublicbooleanfalseIf 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
parserpublicLionInputDate
placeholderpublicstring''LionInput
readOnlypublicbooleanfalseA 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
slotspublicLionInput
typepublicstring'text'LionInput
_calendarInvokerSlotprotectedstring'suffix'The slot to put the invoker button in. Can be ‘prefix’, ‘suffix’, ‘before’ and ‘after’. Default will be ‘suffix’.
_calendarNodeprotectedLionCalendar
_feedbackConditionMetaprotectedLionField
_focusableNodeprotectedLionField
_focusCentralDateOnCalendarOpenprotectedbooleantrue
_hideOnUserSelectprotectedbooleantrue
_inputNodeprotectedHTMLInputElementLionInput
_invokerNodeprotected
_isEditingTextFieldprotected
_isHandlingCalendarUserInputprotectedbooleanfalse
_overlayBackdropNodeprotectedOverlayMixin
_overlayContentNodeprotectedOverlayMixin
_overlayContentWrapperNodeprotectedOverlayMixin
_overlayInvokerNodeprotectedThe 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
_overlayReferenceNodeprotectedOverlayMixin
_syncOnUserSelectprotectedbooleantrue

Methods

NamePrivacyDescriptionParametersReturnInherited From
clearpublicClears modelValue. Interaction states are not cleared (use resetInteractionState for this)LionField
closepublicHides the overlayOverlayMixin
deserializerpublicserializedValue: stringLionInputDate
openpublicShows the overlayOverlayMixin
repositionOverlaypublicSometimes 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
resetpublicResets modelValue to initial value. Interaction states are clearedLionField
resetInteractionStatepublicLionField
serializerpublicmodelValue: DateLionInputDate
togglepublicToggles the overlayOverlayMixin
_calendarTemplateprotectedSubclassers can replace this with their custom extension of LionCalendar, like `<my-calendar id=“calendar”></my-calendar>`
_defineOverlayprotected{ contentNode, invokerNode, referenceNode, backdropNode, contentWrapperNode }, config: DefineOverlayConfigOverlayControllerOverlayMixin
_defineOverlayConfigprotectedObjectOverlayMixin
_getInvokerNodeprotectedElement|nullOverlayMixin
_invokerIconTemplateprotectedSubclassers can replace this with their custom extension invoker icon
_invokerTemplateprotectedSubclassers can replace this with their custom extension invoker, like `<my-button><calendar-icon></calendar-icon></my-button>`
_isPermanentlyDisconnectedprotectedWhen 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
_onCalendarOverlayOpenedprotectedLifecycle callback for subclassers
_onCalendarUserSelectedChangedprotectedTriggered when a user selects a date from the calendar overlay{ target: { selectedDate } }, opts: { target: { selectedDate: Date }}
_onChangeprotectedDispatches custom bubble eventev: Event=LionField
_onValidatorUpdatedprotectedResponsible for listening param change event and sync the calendar dates with the updated validator paramse: Event|CustomEvent, metaData: {validator: Validator}
_overlayFrameTemplateprotected
_overlayTemplateprotectedDefining 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.
_reflectBackOnprotected
_setOpenedWithoutPropertyEffectsprotectedWhen 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: booleanOverlayMixin
_setupOpenCloseListenersprotectedOverlayMixin
_setupOverlayCtrlprotectedOverlayMixin
_teardownOpenCloseListenersprotectedOverlayMixin
_teardownOverlayCtrlprotectedOverlayMixin

Events

NameTypeDescriptionInherited From
opened-changedCustomEventOverlayMixin
user-input-changedEventLionField

Attributes

NameFieldInherited From
calendar-headingcalendarHeading
openedopenedOverlayMixin
modelValuemodelValueLionInputDate
readonlyreadOnlyLionInput
typetypeLionInput
placeholderplaceholderLionInput