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 NumericDatePicker bug #567

Closed
ndegwamartin opened this issue Apr 12, 2021 · 1 comment · Fixed by #577 or #579
Closed

Fix NumericDatePicker bug #567

ndegwamartin opened this issue Apr 12, 2021 · 1 comment · Fixed by #577 or #579
Assignees
Labels

Comments

@ndegwamartin
Copy link
Contributor

A Bug in the NumericDatePicker class which sometimes causes crash when one selects a date out of the range of allowed dates (min and max dates)

@ndegwamartin ndegwamartin self-assigned this Apr 12, 2021
@qiarie
Copy link
Contributor

qiarie commented May 7, 2021

How to Replicate

  1. Run the native-form sample app
  2. Open BIRTH REGISTER form
  3. Scroll to Child's DOB and tap to select a date
  4. On the date picker dialog, select 30 or 31 for the day of the month selector
  5. Try to scroll to 2 (February) on the month selector

Expected Outcome

The app hangs on attempting to select February while the day of the month selected is greater than the possible max value. This is caused by an infinite loop when trying to reset the day part due to the malformed date.

Solution

Reset the day of the month selector max value to 28 (29 if the selected year is a leap year) when the value selected in the month selector is 2 (February)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment