A custom HTML element responsible selecting a value on a range slider with a linked number input field.

Hierarchy (view full)

Properties

_primaryInput: HTMLElement

The primary input (if any). Used to determine what element should receive focus when an associated label is clicked on.

_value: number

The underlying value of the element.

_internals: ElementInternals

Attached ElementInternals which provides form handling functionality.

#rangeInput: HTMLInputElement

The range input.

#numberInput: HTMLInputElement

The number input.

#min: number

The minimum allowed value for the range.

#max: number

The maximum allowed value for the range.

#step: number

A required step size for the range.

tagName: string = "range-picker"
formAssociated: boolean = true

Declare that this custom element provides form element functionality.

Accessors

  • get valueAsNumber(): number
  • The value of the input element.

    Returns number

  • get form(): HTMLFormElement
  • The form this element belongs to.

    Returns HTMLFormElement

  • get name(): string
  • The input element name.

    Returns string

  • get disabled(): boolean
  • Is this element disabled?

    Returns boolean

  • get editable(): boolean
  • Is this field editable? The field can be neither disabled nor readonly.

    Returns boolean

Methods

  • Internal

    Apply key attributes on the containing custom HTML element to input elements contained within it.

    Parameters

    • input: any

    Returns void

  • Protected

    Return the value of the input element which should be submitted to the form.

    Returns number

  • Protected

    Special handling when the custom element is clicked. This should be implemented to transfer focus to an appropriate internal element.

    Parameters

    • event: PointerEvent

    Returns void

  • Update display of the number input as the range slider is actively changed.

    Parameters

    • event: InputEvent

      The originating input event

    Returns void

  • Handle changes to one of the inputs of the range picker element.

    Parameters

    • event: InputEvent

      The originating input change event

    Returns void