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

Validate DatePickerInput to Allow Partial Input with Numbers and Slashes While Typing #1413

Open
harshitg927 opened this issue Jan 17, 2025 · 4 comments

Comments

@harshitg927
Copy link
Contributor

harshitg927 commented Jan 17, 2025

How to Reproduce this issue

  1. login
  2. navigate to results --> Results --> By Patient
  3. Try inputting alphabets in the date picker input field

Current behaviour

Users are allowed to input alphabets even though they shouldn't be

Expected behaviour

User should only be allowed to input numbers and slashes (/) in the correct format

Screen Recording

Screencast.from.17-01-25.20.04.03.webm
@harshitg927
Copy link
Contributor Author

I have already solved this issue on my local machine, please assign me.

@vsvishalsharma
Copy link
Contributor

@harshitg927 go ahead raise a pr

@vsvishalsharma
Copy link
Contributor

@harshitg927 it seems the same issue is occurring with all date inputs, such as in patient history and add patient sections. If possible, try enforcing a common rule for all date inputs. This way, you can reuse the same code to implement consistent checks across all date fields

@harshitg927
Copy link
Contributor Author

@vsvishalsharma I will implement this fix in all the places this issue is present and will raise a PR once done. Thank You for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants