Skip to content

Commit 9a960b3

Browse files
sakibianmofojed
andauthored
fix: Date argument non-optional for the onChange prop (#1622)
Closes: #1601 --------- Signed-off-by: sakibian <sakib192@gmail.com> Co-authored-by: mikebender <mikebender@deephaven.io>
1 parent 52ba2cd commit 9a960b3

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

packages/code-studio/src/styleguide/Inputs.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,5 +363,4 @@ function Inputs(): React.ReactElement {
363363
</div>
364364
);
365365
}
366-
367366
export default Inputs;

packages/components/src/DateInput.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const DATE_FORMAT = 'YYYY-MM-DD';
1212

1313
type DateInputProps = {
1414
className?: string;
15-
onChange?: (date?: string) => void;
15+
onChange?: (date: string) => void;
1616
defaultValue?: string;
1717
onFocus?: () => void;
1818
onBlur?: () => void;
@@ -62,16 +62,6 @@ const DateInput = React.forwardRef<HTMLInputElement, DateInputProps>(
6262
);
6363
}
6464
);
65-
6665
DateInput.displayName = 'DateInput';
6766

68-
DateInput.defaultProps = {
69-
className: '',
70-
onChange: () => false,
71-
defaultValue: '',
72-
onFocus: () => false,
73-
onBlur: () => false,
74-
'data-testid': undefined,
75-
};
76-
7767
export default DateInput;

0 commit comments

Comments
 (0)