8000 Fix: Fix proptypes for DatePicker component · greenbone/gsa@d9ccc42 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit d9ccc42

Browse files
committed
Fix: Fix proptypes for DatePicker component
A value of false is allowed for the minDate to deactivate the minimum date and use date proptype to get better error messages. This fixes some warnings in the tests.
1 parent 6132292 commit d9ccc42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/web/components/form/DatePicker.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ const DatePickerComponent = (
4242

4343
DatePickerComponent.propTypes = {
4444
disabled: PropTypes.bool,
45-
minDate: PropTypes.instanceOf(date),
45+
minDate: PropTypes.oneOfType([PropTypes.date, PropTypes.oneOf([false])]),
4646
name: PropTypes.string.isRequired,
47-
value: PropTypes.instanceOf(date),
47+
value: PropTypes.date,
4848
onChange: PropTypes.func,
4949
label: PropTypes.string,
5050
};

0 commit comments

Comments
 (0)
0