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

Add a DatePicker for Dates to prevent Invalid Dates #125

Open
rylanb opened this issue Jun 29, 2017 · 3 comments
Open

Add a DatePicker for Dates to prevent Invalid Dates #125

rylanb opened this issue Jun 29, 2017 · 3 comments

Comments

@rylanb
Copy link
Collaborator

rylanb commented Jun 29, 2017

Expected Behavior

You cannot send invalid dates to the backend breaking the system with generic 500 error page.

Add a date-picker to make this easier to use and prevent invalid dates.

Actual Behavior

On views like /volunteers/region_admin you can pick dates from a drop-down. There is no validation to check that 6/31 shouldn't be entered and sent to the backend to do log / reporting lookups.

Steps to Recreate

  1. Go to a view that has you doing date lookups: (/logs/by_day?utf8=%E2%9C%93&date%5Bd%283i%29%5D=31&date%5Bd%282i%29%5D=6&date%5Bd%281i%29%5D=2017&commit=Go)
  2. You'll see an 'invalid date' error.
@vidoseaver
Copy link
Contributor

Could use Date.is_valid?(year,month,day)

@brandonbaker40
Copy link
Contributor

@rylanb can I submit a PR for this?

@rylanb
Copy link
Collaborator Author

rylanb commented Oct 26, 2018

Surely! Just assign me when you do!

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

3 participants