-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
TypeScript build failure #579
Comments
I have the same problem with |
@types/react-calendar version 4.0.0 and above has issues. So I downgraded the version of react-date-picker from 9.2.0 to 8.4.0. react-date-picker 8.4.0 used @types/react-calendar version 3.0.0. Worked for me. |
Similar problem |
Sounds like a problem with React-Date-Picker types which seem to be incompatible with built-in, more accurate React-Calendar's one, causing build failure 🤔 |
I think it's going to be solved once React-Date-Picker becomes native TypeScript as well. |
And how long is the wait? Now I can’t put the latest version on the project, the component wrote on 9.0, but putting the same version on a new project, it gives this error, rolling back to version 8.4 - dist/entry.nostyle does not work |
I'm providing updates on my free time with unsustainable funding so well typed package will released anywhere between now and 6 months or so. I'm trying to migrate all packages I have to TypeScript to prevent exactly that. I'm assuming some kind of hotfix can be provided for the already shipped major version, like fixing handwritten types or pinning React-Calendar version to 4.0. |
Pushed a hotfix in v9.2.1, let me know if that's resolved for you! |
Thanks, it worked for me. If there is any error, I will write |
Before you start - checklist
Description
As we know react-date-picker uses react-calendar internally, and react-calendar has made a new release with version 4.1.0.
Because of that react-date-picker is not able to read the react-calender type props causing a build issue, this issue was not for react-calendar version 4.0.0.
Steps to reproduce
1)Install the latest version of react-date-picker
2)Try making react build out in your project
3)System will through a build issue as seen below
TS2322: Type '{ format: string; dayPlaceholder: string; monthPlaceholder: string; yearPlaceholder: string; "data-testid": any; openCalendarOnFocus: false; value: any; onChange: any; maxDate: Date; minDate: Date; }' is not assignable to type 'IntrinsicAttributes & DatePickerProps'.
Property 'value' does not exist on type 'IntrinsicAttributes & DatePickerProps'.
24 | data-testid={props.testId}
25 | openCalendarOnFocus={false}
Expected behavior
Build should be created without an error
Actual behavior
Not able to create a build
Additional information
No response
Environment
The text was updated successfully, but these errors were encountered: