-
-
Notifications
You must be signed in to change notification settings - Fork 70
Add defaultDate prop to DateInput and DatePicker components.
#119
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
base: master
Are you sure you want to change the base?
Conversation
|
How is this different than supplying a date to the |
|
I'm using this for birthday input. There's an important distinction:
These are fundamentally different. To prevent users from forgetting to enter their birthday, the field needs to be empty (no default value). We need defaultDate instead. |
|
Another thing to note is that |
|
Good point about the naming! I see what you mean about However, I'm a bit concerned that exposing What about renaming it to
If that works for you, I can update the PR. Let me know your thoughts! |
|
That's fair, let's go with that |
|
I've pushed the changes. The CI failure is due to Codecov hitting rate limits (all tests and linting passed). |
I've been using this library in production and it's been incredibly helpful. However, I needed the ability to specify a default date for the picker instead of always using
new Date().Changes
defaultDateprop toDateInputcomponentdefaultDateprop toDatePickercomponentUsage