Esri / calcite-design-system

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

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

Open richiecarmichael opened 12 months ago

richiecarmichael commented 12 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 12 months ago

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

richiecarmichael commented 12 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 11 months ago

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

geospatialem commented 11 months ago

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

geospatialem commented 3 months ago

Blocked by the effort in PR https://github.com/Esri/calcite-design-system/pull/8402 to determine if the above is mitigate, or next steps to achieve a solution.