-
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
Fix input date issues #1368
Fix input date issues #1368
Conversation
Removing dead code
…layPicker) => fix issue #1325
src/components/input/date/index.js
Outdated
this.props.onChange(dropDownDate.toISOString()); | ||
// Fire onChange event, only if date if correct, or empty, if the option is activated | ||
if (fromBlur !== true && (isCorrect || (triggerOnChangeIfEmpty && (inputDate || '').trim() === ''))) { | ||
this.props.onChange(isCorrect ? dropDownDate.toISOString() : null); // if date is not correct, it is empty, so send null (or empty string ?) |
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.
No more condition on checkOnlyOnBlur ? When false, onChange should be called when fromBlur.
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.
Could you correct the case when checkOnlyOnBlur is true and fromBlur is true.
@fconstantin Oupsie, was tired I think. Did not see the second part of the condition |
Adding missing check when checkOnlyOnBlur is true and fromBlur is false
@fconstantin I think I should add also the option in accordance with both check |
@fconstantin Should be good |
Fix #1357 and #1325
Still have to test in details before merging