Hacker0x01 / react-datepicker

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

Option "required" should be typed as a boolean, not as a string #4899

Closed alexey-m-ukolov closed 1 week ago

alexey-m-ukolov commented 2 weeks ago

Describe the bug Commit #6fe84be introduced DatePickerProps type in which the required property is typed as a string.

Expected behavior This option should be typed as a boolean as it stated in the docs.

tomekpiwowar commented 2 weeks ago

I agree with @alexey-m-ukolov. Even though the DatePicker component itself is not a form element, the required attribute is typically used in the context of form validation and its expected type in HTML is boolean.

martijnrusschen commented 1 week ago

Should be solved with #4905