Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input-date-picker displays incorrect value if out-of-range #9282

Open
2 of 6 tasks
nwhittaker opened this issue May 7, 2024 · 0 comments
Open
2 of 6 tasks

Input-date-picker displays incorrect value if out-of-range #9282

nwhittaker opened this issue May 7, 2024 · 0 comments
Assignees
Labels
2 - in development Issues that are actively being worked on. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 3 A day or two of work, likely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality p2 - want for current milestone User set priority status of p2 - want for current milestone

Comments

@nwhittaker
Copy link
Contributor

nwhittaker commented May 7, 2024

Check existing issues

Actual Behavior

An input-date-picker pre-populated with an out-of-range value displays the closest in-range value instead of the actual value. The value prop contains the out-of-range value. The out-of-range state is never reflected in the input's validity and does not block form submissions.

Expected Behavior

The input displays the out-of-range value with a rangeOverflow or rangeUnderflow validity. Opening the picker should default the calendar selection to the closest in-range value. This should match how native date-pickers handle the same scenario.

Reproduction Sample

https://codepen.io/nwhittaker-esri/pen/oNRvGqm

Reproduction Steps

  1. Visit the sample
  2. See the displayed value matches the input's min instead of its value attribute
  3. Click the submit button and see a success alert instead of a validation message

Reproduction Version

2.8.0

Relevant Info

No response

Regression?

No response

Priority impact

p2 - want for current milestone

Impact

Field Maps allows users to edit meta data about form controls. As the meta data changes, the validity of a value can change. In those cases, we want the user to be able to identify the invalid data and correct it. For a date field that has become out-of-range, it can be confusing to see it marked as invalid but populated with an in-range value.

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 Field Apps

@nwhittaker nwhittaker added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels May 7, 2024
@github-actions github-actions bot added ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone calcite-components Issues specific to the @esri/calcite-components package. labels May 7, 2024
@geospatialem geospatialem added p - high Issue should be addressed in the current milestone, impacts component or core functionality estimate - 3 A day or two of work, likely requires updates to tests. labels May 9, 2024
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels May 9, 2024
@jcfranco jcfranco added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels May 18, 2024
@github-actions github-actions bot added the p2 - want for current milestone User set priority status of p2 - want for current milestone label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - in development Issues that are actively being worked on. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 3 A day or two of work, likely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - high Issue should be addressed in the current milestone, impacts component or core functionality p2 - want for current milestone User set priority status of p2 - want for current milestone
Projects
None yet
Development

No branches or pull requests

4 participants