Class DatePicker

A date picker widget with standard styling.

Index

Methods

build

  • build(): HTMLInputElement

getDateValue

  • getDateValue(): Date
  • Get the currently selected value in the date picker, as a Date object

    Returns Date

    A Date object for the current value, or null if the date picker was reset or a date has not been selected initially.

getElement

  • getElement(): HTMLInputElement

getValue

  • getValue(): string
  • Gets the currently selected value in the date picker.

    Returns string

    A textual representation of the currently selected value (YYYY-MM-DD format).

reset

  • reset(): void

setValue

  • setValue(date: Date): void

Constructors

constructor

  • Creates a new DatePicker.

    Parameters

    • Default value onChange: function = () => {}

      The function to call when a new value is selected in the date picker. This function takes the current DatePicker instance as an argument.

    Returns DatePicker

Hierarchy

  • DatePicker

Implements