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 selective disabling of DateRangePicker #1116

Merged
merged 3 commits into from
Apr 13, 2018
Merged

Fix selective disabling of DateRangePicker #1116

merged 3 commits into from
Apr 13, 2018

Conversation

majapw
Copy link
Collaborator

@majapw majapw commented Apr 13, 2018

From @ajwild:

@majapw some refactoring of pull request #606 caused a problem here. If disabled is used directly then it causes an error because the individual date pickers still expect a boolean but they can end up with the string values. If you use !!disabled then the endDate string can disable the start date and vice versa. I've reverted this part back to checking equality with true. If you have a suggestion for a better way to handle this let me know.

Git went all weird for me, but this is a version of #1112 with regression tests.

Thanks @ajwild. Sorry for the weirdness. :/

@ljharb

@coveralls
Copy link

coveralls commented Apr 13, 2018

Coverage Status

Coverage remained the same at 84.824% when pulling 13b733f on ajwild-fix into f8562f2 on master.

@ajwild
Copy link
Contributor

ajwild commented Apr 13, 2018

@majapw I'd just done something similar. I also added checks for onFocusChange on DateRangePickerInputController_spec.js.

@majapw
Copy link
Collaborator Author

majapw commented Apr 13, 2018

@ajwild if you share a commit with the controller spec you wrote I'll tack it on on top :)

@ajwild
Copy link
Contributor

ajwild commented Apr 13, 2018

Try this one: ajwild@1bede26

@majapw
Copy link
Collaborator Author

majapw commented Apr 13, 2018

Sweet, I'll merge this in once tests pass again. :)

@ajwild
Copy link
Contributor

ajwild commented Apr 13, 2018

Thanks. I think #593 can be closed now 😄

@majapw majapw merged commit baede98 into master Apr 13, 2018
@majapw majapw deleted the ajwild-fix branch April 13, 2018 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants