Esri / calcite-design-system

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

[Input Date Picker] Buggy experience in `range` when start date populated #8557

Open macandcheese opened 5 months ago

macandcheese commented 5 months ago

Check existing issues

Actual Behavior

Currently, when the start portion of a range is populated, there are some strange behaviors as a user interacting with the component:

https://github.com/Esri/calcite-design-system/assets/4733155/979f459b-e7df-432e-9ab8-1c34202cd1d7

1 - The month in the shown calendar will change to the "current month" when the start value of a range is set and a user hovers over the start dropdown. 2 - A user selecting a date from the start range while the end is not populated, will set the end, not override the start

Expected Behavior

I would not expect the month in the start dropdown to change to the current month while hovering. I would also expect the user interaction with the start date to override the start date, not set the end date - this ux needs to be supported to allow a user to change their start date before selecting an end date.

Note - When used with proximity-selection-disabled the hover-over-start-month-changing-to-current does NOT occur, but the behavior to change the start date without setting an end date is not supported still.

Reproduction Sample

https://codepen.io/mac_and_cheese/pen/vYPLrMV?editors=1000

Reproduction Steps

  1. Open Codepen
  2. Notice the start date is populated
  3. Interact with the start date field to open the dropdown
  4. Begin to hover over the date grid, and notice the switch to the current month, not the populated date.
  5. Select a date.
  6. Notice the selection populates the end date - and does not override the already populated start date

Reproduction Version

2.1

Relevant Info

No response

Regression?

No response

Priority impact

p1 - need for current milestone

Impact

A few aspects here - the "hover to current month" is IMO a serious bug - the "populates end date and not override start date" is also an unexpected UX.

Calcite package

Esri team

Calcite (design)

dhagens commented 5 months ago

This is a showstopper for our team using the picker with the range property. Mostly our end date is set to null and we only want to modify the start date. We are unable to achieve this workflow using the range property. We ended up going with two separate date pickers to achieve this.