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

[calcite-input-date-picker]: min value is disabling month #11321

Open
2 of 6 tasks
jasdelreyes opened this issue Jan 16, 2025 · 3 comments
Open
2 of 6 tasks

[calcite-input-date-picker]: min value is disabling month #11321

jasdelreyes opened this issue Jan 16, 2025 · 3 comments
Assignees
Labels
3 - installed Issues that have been merged to master branch and are ready for final confirmation. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 3 A day or two of work, likely requires updates to tests. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone p - medium Issue is non core or affecting less that 60% of people using the library

Comments

@jasdelreyes
Copy link

Check existing issues

Actual Behavior

When the min is set to a day in a month different from the initially selected date, the whole month of the min value is disabled in the dropdown.

Image

Expected Behavior

The month of the minDate, when appropriate should be enabled in the dropdown.

For example, if the minimum date were January 16th, January should still be enabled due to other days in January that are still valid.

Reproduction Sample

https://codepen.io/jasdelreyes/pen/MYgXzEO

Reproduction Steps

Open codepen link.

Reproduction Version

~3.0.0-next.90

Relevant Info

No response

Regression?

No response

Priority impact

impact - p1 - need for current milestone

Impact

No response

Calcite package

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

Esri team

ArcGIS Online

@jasdelreyes jasdelreyes 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 Jan 16, 2025
@github-actions github-actions bot added ArcGIS Online Issues logged by ArcGIS Online team members. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone labels Jan 16, 2025
@jasdelreyes jasdelreyes changed the title calcite-input-time-picker calcite-input-time-picker min value is disabling month Jan 16, 2025
@jasdelreyes jasdelreyes changed the title calcite-input-time-picker min value is disabling month [calcite-input-time-picker]: min value is disabling month Jan 16, 2025
@anveshmekala anveshmekala self-assigned this Jan 16, 2025
@anveshmekala anveshmekala added estimate - 3 A day or two of work, likely requires updates to tests. 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Jan 16, 2025
@geospatialem geospatialem added p - medium Issue is non core or affecting less that 60% of people using the library and removed needs triage Planning workflow - pending design/dev review. labels Jan 21, 2025
@anveshmekala anveshmekala changed the title [calcite-input-time-picker]: min value is disabling month [calcite-input-date-picker]: min value is disabling month Jan 21, 2025
@anveshmekala anveshmekala 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 Jan 22, 2025
anveshmekala added a commit that referenced this issue Jan 23, 2025
#11350)

**Related Issue:** #11321 

## Summary

No longer disable min,max month's in select menu of date-picker.
@anveshmekala anveshmekala 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 Jan 23, 2025
@github-actions github-actions bot assigned geospatialem and DitwanP and unassigned anveshmekala Jan 23, 2025
Copy link
Contributor

Installed and assigned for verification.

@anveshmekala
Copy link
Contributor

anveshmekala commented Jan 23, 2025

Hi @jasdelreyes ,

Noticed min is assigned a value of type Date in the codepen instead of string value. If you wish to use Date type we recommend minAsDate/maxAsDate properties. Once #10329 is fixed they should work as expected.

@jasdelreyes
Copy link
Author

jasdelreyes commented Jan 24, 2025

@anveshmekala Thanks for pointing that out. I've tried using the minAsDate/maxAsDate properties alternatively, but now the component does not honor the minimum date set and allows dates before the minimum date to be selected. I've saved this use case in the codepen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - installed Issues that have been merged to master branch and are ready for final confirmation. ArcGIS Online Issues logged by ArcGIS Online team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. estimate - 3 A day or two of work, likely requires updates to tests. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone p - medium Issue is non core or affecting less that 60% of people using the library
Projects
None yet
Development

No branches or pull requests

4 participants