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

Disabled Date Picker is still interactive #4730

Closed
4 of 11 tasks
origami-z opened this issue Feb 19, 2025 · 2 comments · Fixed by #4734
Closed
4 of 11 tasks

Disabled Date Picker is still interactive #4730

origami-z opened this issue Feb 19, 2025 · 2 comments · Fixed by #4734
Labels
community For issues that have been raised by folks outside the core Salt team component: date picker package: lab Lab package status: awaiting triage Automatically added to new issues. Should be removed once they have been triaged.

Comments

@origami-z
Copy link
Contributor

origami-z commented Feb 19, 2025

Latest version

  • I have tested the latest version

Description

When setting disabled on DatePicker, it only disables the calendar icon in the input, but the date input is still receiving focus. You can obviously set the same on DatePickerSingleInput, but the misaligned disable behavior between focus and icon is confusing.

Steps to reproduce

<DatePicker selectionVariant="single" disabled>

https://stackblitz.com/edit/salt-template-jndhv5y2?file=src%2FApp.tsx,package.json

Expected behavior

Setting disabled should disable the full component.

Also, onClick event shouldn't be triggered.

Package name(s)

Lab (@salt-ds/lab)

Package version(s)

1.0.0-alpha.60

Browser

  • Chrome
  • Safari
  • Firefox
  • Microsoft Edge

Operating system

  • macOS
  • Windows
  • Linux
  • iOS
  • Android

Are you a JPMorgan Chase & Co. employee?

  • I am an employee of JPMorgan Chase & Co.
@origami-z origami-z added community For issues that have been raised by folks outside the core Salt team component: date picker package: lab Lab package status: awaiting triage Automatically added to new issues. Should be removed once they have been triaged. labels Feb 19, 2025
@origami-z origami-z changed the title Disabled Date Picker still receives focus Disabled Date Picker is still interactive Feb 19, 2025
@alexmotoc
Copy link
Contributor

I've raised a small PR which passes the disabled prop down to the input components. Have updated both the single and range inputs. Happy to make any updates if that was not the intention of this issue!

@mark-tate
Copy link
Contributor

Contribution from Alex in PR - LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community For issues that have been raised by folks outside the core Salt team component: date picker package: lab Lab package status: awaiting triage Automatically added to new issues. Should be removed once they have been triaged.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants