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

Allow prop to determine if date is required #16

Closed
jtwhittington opened this issue Nov 10, 2017 · 2 comments
Closed

Allow prop to determine if date is required #16

jtwhittington opened this issue Nov 10, 2017 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jtwhittington
Copy link

Currently the inputs for the date-picker are hard-coded as being required. Would you be interested in allowing a prop to determine if the date is required or not?

Only reason I am not just making a PR - I found when not required, the inputs are filled out automatically once you enter a single value (day, month, or year) and also its basically impossible to clear the date.

I'd be happy to dig into it more.

@wojtekmaj wojtekmaj added the enhancement New feature or request label Nov 10, 2017
@wojtekmaj
Copy link
Owner

Hmmm. That's a little tough indeed. I currently have no time to dig into this, but I guess it is a very needed enhancement.

I believe that onChangeExternal function would be the one to be changed in order to validate. Currently, we're running native .checkValidity() on each field (day, month, year). Changing it so that it also validates on its own whether all fields are filled in would be a good addition allowing us to change required flag via props.

That also has drawn my attention that there's no clear button... Looks like a lot of great ideas. Now let's hope this weekend will be a calm one...!

@wojtekmaj wojtekmaj self-assigned this Nov 10, 2017
@wojtekmaj
Copy link
Owner

Hey @jtwhittington,
Version 6.4.0 just went out and you can now have fields not required. All the side effects you were writing about were elliminated. Please let me know what you think!

@wojtekmaj wojtekmaj added this to the 6.4.0 milestone Dec 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants