Skip to content

CalciteInputDatePicker with range sets end date when changing the start date if there's an initial value set #10113

@fnquinteros

Description

@fnquinteros

Check existing issues

Actual Behavior

This only happens when there's an initial value set and only on the first input.

When it has an initial value set, setting the start date changes the end date and leaves the start date as it is.
If you refresh and start over, changing the end date first set the start date to null.

After the first value change, the input behaves es axpected.

Expected Behavior

Setting the start or end date for the first time when there's an initial value changes them accordingly and do not change anything else.

Reproduction Sample

https://codesandbox.io/p/devbox/happy-hooks-742ty6?file=%2Fsrc%2FApp.jsx

Reproduction Steps

  1. Change the start date to some day a few days in the future (3 or 4 days)
  2. Observe the actual value set to the start date and check that the value you set was actually set on the end date.
  3. refresh
  4. set the end date
  5. observe the start date. It will be empty.

Reproduction Version

latest (2.11.1)

Relevant Info

Tested on Chrome latest version, on a Macbook. Also ran on code sandbox, so it should happen regardless of OS.

Regression?

No response

Priority impact

impact - p1 - need for current milestone

Impact

At the moment, this can be solved with a workaround by setting the initial value after rendering the component, instead of passing the initial value to the component right away.

We're planning on releasing a redesign of a feature that includes this date picker in October. Would be nice to have it fixed by then.

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Urban

Metadata

Metadata

Labels

4 - verifiedIssues that have been tested, confirmed as mitigated, and are ready to close.ArcGIS UrbanIssues logged by ArcGIS Urban team members.bugBug reports for broken functionality. Issues should include a reproduction of the bug.calcite-components-reactIssues specific to the @esri/calcite-components-react package.estimate - 2Small fix or update, may require updates to tests.impact - p1 - need for current milestoneUser set priority impact status of p1 - need for current milestonep - highIssue should be addressed in the current milestone, impacts component or core functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions