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

[Feature Request]: certificate-download-modal component datepicker enhancements #20274

Open
mgporter opened this issue May 7, 2024 · 0 comments
Labels
enhancement Label to indicate an issue is a feature/improvement

Comments

@mgporter
Copy link

mgporter commented May 7, 2024

Is your feature request related to a problem? Please describe.

Hi all. I was working on the certificate-download-modal component for another PR, and ran across a few small issues:

  1. The end date for generating the certificate is exclusive, meaning that a contribution done today will only show up if we select tomorrow as the end date.

  2. The frontend datepicker allows a user to select dates in the future, however the backend server rejects dates that are in the future.

Describe the solution (or solutions) you'd like

  1. It feels more natural for the end date to be inclusive, i.e., if I select May 3 as the end date for contributions, I would expect that my contributions on May 3rd would show up. We could fix this by adding one day to the user's selected end date on either the frontend or backend side of things.

  2. Dates in the future should be unselectable on the frontend. Since this modal is just using an html date type input element, we can just add a max attribute to it and set that to today's date. We can keep the backend date validation check though, for extra redundancy.

Describe alternatives you've considered and rejected

No response

Additional context

If you approve of these suggestions, you can assign them to me.

@mgporter mgporter added enhancement Label to indicate an issue is a feature/improvement triage needed labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Label to indicate an issue is a feature/improvement
Projects
Status: Todo
Development

No branches or pull requests

2 participants