Esri / calcite-design-system

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

[input-date-picker] - Component does not initialize with `value`. #8157

Open richiecarmichael opened 8 months ago

richiecarmichael commented 8 months ago

Check existing issues

Actual Behavior

Component does not initialize ISO date. Only place holder text displayed.

          <calcite-input-date-picker
            value={this._departureDate} // "2023-01-01"
          />

Workaround:

          <calcite-input-date-picker
            valueAsDate={toLocalDate(this._departureDate)}
          />

where:

function toLocalDate(utcDate: string): Date {
  const date = new Date(utcDate);
  return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
}

Expected Behavior

Expe

Reproduction Sample

None

Reproduction Steps

None

Reproduction Version

1.10.0

Relevant Info

No response

Regression?

No response

Priority impact

p3 - want for upcoming milestone

Impact

No response

Calcite package

Esri team

ArcGIS Maps SDK for JavaScript

maxpatiiuk commented 7 months ago

@richiecarmichael is this a duplicate of https://github.com/Esri/calcite-design-system/issues/7014?

richiecarmichael commented 7 months ago

7014 is specific to calcite-input-number whereas I'm seeing an issue with calcite-input-date-picker. As @JonUihlein mentioned here the issues may be related. Let's keep this for now. I can assist with verifying/testing when #7014 is fixed.

jcfranco commented 7 months ago

@eriklharper We estimated this at a 5. Do you agree with this or should it be higher/lower?

geospatialem commented 7 months ago

Estimate updated to reflect additional team expertise, which should include updating the tests to allow sending in a full UTC string.