Skip to content
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] Unable to omit properties from DateInputProps #5167

Open
ViaxCo opened this issue Oct 17, 2024 · 0 comments
Open

[TypeScript] Unable to omit properties from DateInputProps #5167

ViaxCo opened this issue Oct 17, 2024 · 0 comments

Comments

@ViaxCo
Copy link

ViaxCo commented Oct 17, 2024

Describe the bug
Upgrading to v7.4.0, I'm unable to omit any properties from DateInputProps when building my own component.

To Reproduce
Steps to reproduce the behavior:

  1. Install version 7.4.0 of react-datepicker
  2. Create a type like this: type X = Omit<DateInputProps, 'onChange'>;
  3. Check the value of type X
  4. See error

Expected behavior
It should omit the specified keys from the type.

Screenshots

CleanShot 2024-10-17 at 13 51 52

Desktop (please complete the following information):

  • OS: macOS 14.6.1
  • Browser Chrome
  • Version 129.0.6668.101

Smartphone (please complete the following information):
N/A

Additional context
Downgrading to v7.3.0, the omit works fine. Only present in v7.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant