BugiDev / react-native-calendar-strip

Easy to use and visually stunning calendar component for React Native.
MIT License
933 stars 325 forks source link

Type 'Date' is not assignable to type 'Moment' #300

Closed jnsvu closed 3 years ago

jnsvu commented 3 years ago

selectedDate, minDate, maxDate , startingDate props give the above ts error when passing date instead of moment date. According to docs those props should accept dates as well.

chungweileong94 commented 3 years ago

@sniib Yes, it accepts both Moment & Date. As for now, my temporary workaround is to use the patch-package to patch the type.

peacechen commented 3 years ago

@chungweileong94 Did you patch the TS definition? Please submit a PR with the fixes.

chungweileong94 commented 3 years ago

@peacechen Just create a PR for that. https://github.com/BugiDev/react-native-calendar-strip/pull/301

peacechen commented 3 years ago

Fix published in 2.2.3. Thanks for the PR @chungweileong94