gusparis / react-native-month-year-picker

React Native Month Picker component for iOS & Android
MIT License
106 stars 74 forks source link

Receiving invalid date for all input on android #39

Closed jennifer-dickinson closed 3 years ago

jennifer-dickinson commented 3 years ago

As of 1.4.0, android side is returning 'Invalid Date' to the onChange callback for any value selected.

jennifer-dickinson commented 3 years ago

Fixed invalid date by changing MonthPicker.android.js line 29 to:

          date = moment(new Date(year, month), NATIVE_FORMAT).format(

On a related note, the returned month does not match the selected month. The maximumDate is also off by one month.

gusparis commented 3 years ago

Thanks for using the library! I will push a new version with the fix in an hour or two.

gusparis commented 3 years ago

:tada: This issue has been resolved in version 1.4.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: