web-ridge / react-native-paper-dates

Smooth and fast cross platform Material Design date and time picker for React Native Paper
https://www.reactnativepaperdates.com
MIT License
657 stars 170 forks source link

Select a Range Date, Save, Open again => Error #137

Closed alexaalex70 closed 2 years ago

alexaalex70 commented 2 years ago

HI,

I am selecting a date multiple, than I press save, everything fine, as in example. But when I try to reopen I get this error.

TypeError: secondDate.getFullYear is not a function

This error is located at:
    in Calendar (at DatePickerModalContent.tsx:167)

If anyone can help, would be great.

Thanks!

J3j3m commented 2 years ago

Hi, can 't reproduce the issue. Could you provide sample code ?

RichardLindhout commented 2 years ago

@alexaalex70 I think you don't provide a JS Date as value it's not required but if you specify the value it must be a JS Date object instead of something like a string or momentjs date