Esri / calcite-design-system

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

The calciteDatePickerChange event is not triggered when the value of input date picker is cleared #4363

Closed fendiaoxiaoshuazi closed 2 years ago

fendiaoxiaoshuazi commented 2 years ago

Actual Behavior

The calciteDatePickerChange event of the input date picker does not get triggered when the value is cleared.

Expected Behavior

The calciteDatePickerChange event of the input date picker should be triggered when the value is cleared.

Reproduction Sample

https://codepen.io/nan9266/pen/GRyOZLx?editors=1111

Reproduction Steps

  1. Open the console of the sample above
  2. Change the value of the input date picker, observe that the calciteDatePickerChange is triggered, and "Test picker changed" appears in the console.
  3. Clear the value of the input date picker, observe that the calciteDatePickerChange is not triggered.

Reproduction Version

beta.80

Relevant Info

No response

Regression?

No response

fendiaoxiaoshuazi commented 2 years ago

This is a crucial issue for Survey123. In survey123 web app, all the question's runtime value is stored in a internal object(Model), if the date picker value(UI) changed, we sync the value to the internal object(Model), if the value in the internal object(Model) changed, we updated the date picker(UI), so the calciteDatePickerChange event should reflect all the value change for us.

  1. For a required date question, we are not able to prevent submission when the input value gets cleared.
  2. When the value gets cleared, we are not able to change the actual submission value since we don't know the value has been changed.
github-actions[bot] commented 2 years ago

Installed and assigned for verification.

geospatialem commented 2 years ago

verified in next ✅