Skip to content

Platform Datetime Picker is missing the read-only state #14706

Open

Description

@InnaAtanasova

Platform Datetime Picker (fdp-datetime-picker) has no working read-only state. It inherits a readonly input from BaseInput, but the component neither uses nor forwards it, and the underlying Core Datetime Picker has no full-control read-only input to forward to. As a result [readonly]="true" has no effect: the native input's readOnly stays false, the user can type a valid datetime (which commits and marks the control dirty), and the picker button still opens.

Expected behavior

  • [readonly]="true" marks the control read-only: typing a datetime and opening the picker are blocked, and no user action changes the value or marks the control dirty.
  • The native input reflects readOnly = true.
  • The control renders with a read-only visual state.
  • Programmatic updates (setValue, patchValue, writeValue, reset) still work while read-only.

Current behavior

  • readonly is not used/forwarded in the Platform Datetime Picker template.
  • Core Datetime Picker exposes no full-control read-only input.
  • Native input.readOnly remains false; typing a valid datetime commits it and
    marks the form dirty; the picker trigger still opens.

Steps to reproduce

  1. Set up an fdp-datetime-picker with [readonly]="true" and a seeded datetime.
  2. Type a valid datetime (e.g. 11/13/2026, 7:12 PM), or click the picker button.
  3. The value changes / the picker opens; the control is marked dirty.

Dependencies / order of work

  1. fundamental-styles first — add the missing read-only modifier/state classes (the visual part) for the datetime picker / its input group and trigger button.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions