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 DatePickerAndroid error when passing "minDate: null" #1

Merged
merged 1 commit into from
Sep 26, 2018

Conversation

MaxInMoon
Copy link
Owner

Fixes facebook#21253

It avoids an error when passing an options object with minDate: null. (see facebook#21253)
Inspired by isObjectLike from Loadash.

Test Plan:

This jsbin allow to test the old and the new _toMillis function.

You can observe that _toMillis doesn't throw error (fixed) and that if you decomment the _toMillis_before_pr call, it will generate an error as before.

Release Notes:

[ANDROID] [BUGFIX] [DatePickerAndroid] fix error when passing "minDate: null"

It avoids an error when passing an `options` object with `minDate: null`.

Inspired by isObjectLike from Loadash (https://github.com/lodash/lodash/blob/4.17.10/lodash.js#L11771-L11773).
@MaxInMoon MaxInMoon merged commit 5536cff into master Sep 26, 2018
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.

[0.57] [Android] DatePickerAndroid doesn't open because of null minDate
1 participant