-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Only future date optional prop added to DatePicker #203
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/code4romania/taskforce-fe-components/8e94fjzfb |
@@ -57,7 +60,7 @@ export const DatePicker = ({ | |||
); | |||
}; | |||
|
|||
const DateOnlyPicker = ({ startDate, maxDate, onChange }) => { | |||
const DateOnlyPicker = ({ startDate, maxDate, onChange, onlyFutureTime }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't be more flexible to have it as a minDate
prop instead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used another field due to requirements. @aniri said that it should be a property set to true / false.
minDate
should be a Date
not a Bool
by definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that she meant the property in the question entry. This shouldn't be to different from what is already implemented for allowFuture
in the previous link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for my mistake,. I will rework the code tonight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#173
Added new optional constraint for minimum date allowing only for future date or not.