Describe the bug
Getting a lot of wrong errors from types
Using DayPickerInput with dayPickerProps prop, keep getting error that renderDay, renderWeek are required , but should they be?
import { DateUtils } from 'react-day-picker'
DateUtils.isDate(...)
'DateUtils' only refers to a type, but is being used as a value here.
Fix: (removed export before type) +

DayPickerInputProps props onDayPickerShow, onDayPickerHide are required but should they?
Also experiencing 1️⃣. I had to hide dayPickerProps prop of DayPickerInput component behind a @ts-ignore
I think the 1st one should be fixed by my PR https://github.com/gpbl/react-day-picker/pull/1012 (merged quickly by @gpbl, thank you!), not yet published to npm.
Regarding 2nd bug, I fixed the same error for another export (https://github.com/gpbl/react-day-picker/pull/1011), so the fix here could be similar?!
3rd: the JS implementation checks if the props are set before calling those event handlers, so I think they are not mandatory and should be fixed similar to 1.
I experienced the same with MomentLocaleUtils ... that broken release should be unpublished
FYI: A workaround is to stay at the previous version by removing "^" in your package.json:
"react-day-picker": "7.4.0",
(reinstall of course)
I'm sorry for that! The hard life of a maintainer :) I should never trust PRs without proper testing and the release was rushed up.
Setting up a typescript app to test it, let see if I come out.
Please send PRs to help as I'm a bit busy these days 🙏🏽
I'll send a PR to fix issues 2 and 3 in a bit and update here.
EDIT: PR is up
@gpbl would appreciate your review there.
Well I've been neglecting the types for too much time :(
There were many parts requiring a rewrite – now types should work correctly. Please report back if something break again.
Everybody – thanks for your patience. So glad the next version will be in Typescript :)
@gpbl Thank YOU. No need to apologize - this is Open Source, after all. Thanks for your quick folllow-up :-)
Most helpful comment
I'll send a PR to fix issues 2 and 3 in a bit and update here.
EDIT: PR is up
@gpbl would appreciate your review there.