Hacker0x01 / react-datepicker

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

Exported typing of "required" is a string when it should be a boolean #4915

Closed nick-heard closed 1 week ago

nick-heard commented 1 week ago

Describe the bug The complied output of required in DatePickerProps is required?: string; when it's supposed to be a boolean https://github.com/Hacker0x01/react-datepicker/blob/main/docs/datepicker.md

Type def in here is incorrect node_modules/react-datepicker/dist/index.d.ts

To Reproduce Import ReactDatePicker and set the required prop as a boolean

Expected behavior A boolean should be accepted

nick-heard commented 1 week ago

I see this is a duplicate of https://github.com/Hacker0x01/react-datepicker/issues/4899 so should be resolved soon