Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React
https://reactdatepicker.com/
MIT License
7.89k stars 2.23k forks source link

excludScrollbar an optional property #4922

Open lordenas opened 1 week ago

lordenas commented 1 week ago

Describe the bug excludeScrollbar - should be an optional property in DatePickerProps

To Reproduce https://codesandbox.io/p/sandbox/datepickerprops-92df8r?file=%2Fsrc%2FApp.tsx

I want to make a wrapper for a component. To pass all its properties I use DatePickerProps from the react-datepicker import. But the excludeScrollbar property should be an optional property

Expected behavior excludeScrollbar - should be an optional property in DatePickerProps

yuki0410-dev commented 1 week ago

@lordenas Would this page be helpful? (It seems to be a glitch in ts.) https://stackoverflow.com/questions/78641187/why-is-excludscrollbar-property-required-for-react-datepicker

When reproducing it at hand, I forked codesandbox, but the type error is not occurring for some reason. https://codesandbox.io/p/sandbox/datepickerprops-forked-vzwr86

Would bringing ts up to date improve this?

lordenas commented 1 week ago

@lordenas Would this page be helpful? (It seems to be a glitch in ts.) https://stackoverflow.com/questions/78641187/why-is-excludscrollbar-property-required-for-react-datepicker

When reproducing it at hand, I forked codesandbox, but the type error is not occurring for some reason. https://codesandbox.io/p/sandbox/datepickerprops-forked-vzwr86

Would bringing ts up to date improve this?

It's strange, but I still see the error in CodeSandox

image
yuki0410-dev commented 1 week ago

I created a PR for type modification.

4932