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

fix(TimePicker): Fix input wrong number validation #1639

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

nikitaorliak-cengage
Copy link
Collaborator

@nikitaorliak-cengage nikitaorliak-cengage commented Jan 30, 2025

Issue: #1517

What I did

Fix TimePicker validation.

Screenshots:

Checklist

  • changeset has been added
  • Pull request description is descriptive
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works

How to test

  • Open Storybook -> TimePicker -> Replace the time with '11:59' -> Try replacing the minutes from 59 to 30 by pressing the number 3 when the minutes are selected, then 0 -> Notice that the time ends up being '30'.
  • Same for Hours -> '11:59' -> Replacing from 11 to 9 -> Notice that the time ends up being '9'.

@nikitaorliak-cengage nikitaorliak-cengage added the ready for review Pull requests that are ready for developer review label Jan 30, 2025
@nikitaorliak-cengage nikitaorliak-cengage self-assigned this Jan 30, 2025
Copy link

changeset-bot bot commented Jan 30, 2025

🦋 Changeset detected

Latest commit: 48f8c6d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
react-magma-dom Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Copy link
Contributor

@chris-cedrone-cengage
Copy link
Collaborator

I see this bug when replicating these steps

  1. In Storybook > TimePicker
  2. Replace the time with 11:59
  3. Try replacing the minutes from 59 to 30 by pressing the number 3 when the minutes are selected, then 0
  4. Notice that the time ends up being 50

@silvalaura
Copy link
Collaborator

I see what Chris said above -- seems to depend where the cursor is placed when clicking inside the time picker.

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Copy link
Contributor

github-actions bot commented Feb 4, 2025

@silvalaura silvalaura added the needs design feedback Waiting for Design approval or feedback label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs design feedback Waiting for Design approval or feedback ready for review Pull requests that are ready for developer review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TimePicker: Entering a new time does not completely clear the input
3 participants