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 - calendar doesn't adjust to programmatically specified date #6495

Closed
jlias-devtester opened this issue Feb 17, 2023 · 4 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. c-datepicker Issues that pertain to the calcite-date-picker component p - high Issue should be addressed in the current milestone, impacts component or core functionality

Comments

@jlias-devtester
Copy link

jlias-devtester commented Feb 17, 2023

Actual Behavior

In ArcGIS Online, it is possible to get the date picker in a state where you cannot select the start and end dates you need

Expected Behavior

Regardless of how you select a start and end date, the calendar picker should update to show the correct month that you're trying to select.

Reproduction Sample

https://codepen.io/rpanichakit/pen/RwYPYvq

Reproduction Steps

  1. Prepare a clean ENU browser.
  2. ArcGIS online
  3. Switch to Organization page and click Status tab.
  4. Navigation to Reports and click Create Single report.
  5. Expand Report type and select Activity.
    Scenario 1:
  6. Navigation to Month and expand end date calendar.
  7. Select the previous month of current month. (e.g. Select January in 2023 since current month is February) -key step
  8. Navigation to Quarter and expand end date calendar.
  9. Click > Next icon on calendar and observe the result.
  10. Expand start date calendar.
  11. Click < Previous icon on calendar and observe the result.
    Scenario 2:
  12. Navigate to Week and expand start date calendar after step 5.
  13. Select certain date which is in current quarter. (e.g. Select 1/1/2023 date since current quarter is from January to March)-key step
  14. Navigation to Quarter and expand end date calendar.
  15. Click > Next icon on calendar and observe the result.
  16. Expand start date calendar.
  17. Click < Previous icon on calendar and observe the result.

Actual Result:

  1. It is skipped from January 2023 to December 2022 after clicking > Next icon on calendar in step 9 and step 15.
  2. It is skipped from December 2022 to September 2022 after clicking < Previous icon on calendar in step 11 and step 17.

Reproduction Version

not sure

Relevant Info

No response

Regression?

I do not believe so as this is reproducible in production, so it's been a bug since at least November 2022.

Impact

No response

Esri team

ArcGIS Online

@jlias-devtester jlias-devtester added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Feb 17, 2023
@github-actions github-actions bot added the ArcGIS Online Issues logged by ArcGIS Online team members. label Feb 17, 2023
@macandcheese macandcheese added the c-datepicker Issues that pertain to the calcite-date-picker component label Mar 30, 2023
@geospatialem
Copy link
Member

Related #6469

@geospatialem geospatialem added p - high Issue should be addressed in the current milestone, impacts component or core functionality research Issues that require more in-depth research or multiple team members to resolve or make decision. 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 Apr 18, 2023
@geospatialem
Copy link
Member

Research to be conducted in June with other input-date-picker like issues for a time estimate in an upcoming milestone.

@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. research Issues that require more in-depth research or multiple team members to resolve or make decision. labels Jun 23, 2023
jcfranco added a commit that referenced this issue Jun 27, 2023
…7219)

**Related Issue:** #6495 

## Summary

This ensures the active date is reset properly after a
`calcite-input-date-picker`'s date picker is closed (either by blurring
or selecting a date).

## Notes

* This adds an internal `reset` method that can be made public in the
future if needed.
* There was an existing `reset` method prior to these changes that seems
to clear the active date when the date picker is blurred or when
`Escape` is pressed. We should revisit this behavior since it was [added
when the input and date picker were a single
component](https://github.com/Esri/calcite-components/blob/v1.0.0-beta.22/src/components/calcite-date/calcite-date.tsx#L263-L270)
and it does seem odd to have the date-picker reset in these scenarios.
cc @macandcheese @SkyeSeitz @ashetland
* Utility test methods to interact with internal components were added
and tests were updated to leverage them
* Slightly increases the duration factor in the tests to work around
#6604

---------

Co-authored-by: Ben Elan <no-reply@benelan.dev>
@jcfranco jcfranco added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Jun 27, 2023
@github-actions github-actions bot assigned geospatialem and unassigned jcfranco Jun 27, 2023
@github-actions
Copy link
Contributor

Installed and assigned for verification.

benelan added a commit that referenced this issue Jun 28, 2023
…7219)

**Related Issue:** #6495 

## Summary

This ensures the active date is reset properly after a
`calcite-input-date-picker`'s date picker is closed (either by blurring
or selecting a date).

## Notes

* This adds an internal `reset` method that can be made public in the
future if needed.
* There was an existing `reset` method prior to these changes that seems
to clear the active date when the date picker is blurred or when
`Escape` is pressed. We should revisit this behavior since it was [added
when the input and date picker were a single
component](https://github.com/Esri/calcite-components/blob/v1.0.0-beta.22/src/components/calcite-date/calcite-date.tsx#L263-L270)
and it does seem odd to have the date-picker reset in these scenarios.
cc @macandcheese @SkyeSeitz @ashetland
* Utility test methods to interact with internal components were added
and tests were updated to leverage them
* Slightly increases the duration factor in the tests to work around
#6604

---------

Co-authored-by: Ben Elan <no-reply@benelan.dev>
@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Jun 29, 2023
@geospatialem
Copy link
Member

geospatialem commented Jun 29, 2023

Verified on 1.5.0-next.8

verify-input-date-picker-specified-dates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. c-datepicker Issues that pertain to the calcite-date-picker component p - high Issue should be addressed in the current milestone, impacts component or core functionality
Projects
None yet
Development

No branches or pull requests

5 participants