@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Adapter for ISO 8601 date strings (YYYY-MM-DD).

    Strips whitespace and validates that the input matches the ISO date format and represents a real calendar date. The value produced is the trimmed string.

    Shows a calendar prefix icon.

    readonly adapter = new DateTextAdapter();
    // "2025-12-31" → value "2025-12-31"

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    prefixIcon: "<path d=\"M8 2v4\" /><path d=\"M16 2v4\" /><rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\" /><path d=\"M3 10h18\" />" = UIIcons.Lucide.Time.Calendar

    Optional SVG icon content to display before the input.

    Should be a Lucide SVG inner-content string (e.g. UIIcons.Lucide.Text.AtSign).

    Methods

    • Transform the raw text into the adapted value.

      Called on every input event. The result is stored in the value model and written back to the native input element, so the user sees the adapted text. The original keystrokes are preserved in the text model.

      Parameters

      • text: string

        Raw text from the input element.

      Returns string

      Adapted value string (displayed in the field and emitted via value).

    • Validate the raw text and return a result indicating whether the current input is valid.

      When present, UIInput exposes a valid signal and applies the invalid host class when validation fails.

      Parameters

      • text: string

        Raw text from the input element.

      Returns TextAdapterValidationResult

      Validation result with valid flag and error messages.