hypeserver / react-date-range

A React component for choosing dates and date ranges.
MIT License
2.58k stars 667 forks source link

Property disabledDay doesn't work with Typescript #436

Open mrsrhn opened 3 years ago

mrsrhn commented 3 years ago

Subject of the issue

Property disabledDay doesn't work in Calendar Component. I get the Error

"Property 'disabledDay' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly & Readonly<...>'."

[BUG] Bug Reproduce Steps

<Calendar
      date={myDate}
      disabledDay={(d:Date) => {
              return true;
      }}
/>

[BUG] Expected behaviour

It should work :D Actually it works in JS, but not in Typescript.

Environment

Package Version: 1.1.3 React version: 16.13.1 Node version: 12.16.0