Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
269 stars 75 forks source link

Cannot set `min`/`max` constraints on input with `datetime-local` type #9281

Open nwhittaker opened 1 month ago

nwhittaker commented 1 month ago

Check existing issues

Actual Behavior

Given a <calcite-input type="datetime-local" /> input, the min/max attributes are unable to be set programmatically due to TypeScript errors. This is because the min/max attributes are typed as numbers.

Expected Behavior

The min/max attributes also accepts strings for constraining a datetime-local value.

Reproduction Sample

https://developers.arcgis.com/calcite-design-system/components/input/

Reproduction Steps

  1. Visit the doc page
  2. Set the type property to datetime-local
  3. Attempt to set the min and max properties to ISO datetime strings

Reproduction Version

2.8.0

Relevant Info

No response

Regression?

No response

Priority impact

p2 - want for current milestone

Impact

The team is looking to use the datetime-local type until https://github.com/Esri/calcite-design-system/issues/7074 is implemented. In the meantime, it would be beneficial to be able to apply min/max constraints to datetime values.

Calcite package

Esri team

ArcGIS Field Apps

geospatialem commented 1 month ago

Will investigate further after the efforts of https://github.com/Esri/calcite-design-system/issues/8126 are implemented.