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

Fix input date issues #1368

Merged
merged 4 commits into from
Apr 14, 2017
Merged

Fix input date issues #1368

merged 4 commits into from
Apr 14, 2017

Conversation

Hartorn
Copy link
Contributor

@Hartorn Hartorn commented Apr 6, 2017

Fix #1357 and #1325

Still have to test in details before merging

@Hartorn Hartorn added this to the Short term release milestone Apr 6, 2017
@Hartorn Hartorn self-assigned this Apr 6, 2017
@Hartorn Hartorn requested a review from fconstantin April 6, 2017 17:11
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 ?)
Copy link
Contributor

@fconstantin fconstantin Apr 10, 2017

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.

Copy link
Contributor

@fconstantin fconstantin left a 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.

@Hartorn
Copy link
Contributor Author

Hartorn commented Apr 10, 2017

@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
@Hartorn
Copy link
Contributor Author

Hartorn commented Apr 10, 2017

@fconstantin I think I should add also the option in accordance with both check

@Hartorn
Copy link
Contributor Author

Hartorn commented Apr 10, 2017

@fconstantin Should be good

@Hartorn Hartorn merged commit 816f5f6 into develop Apr 14, 2017
@Hartorn Hartorn deleted the fix-input-date-issues branch April 14, 2017 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants