Skip to content

Commit 9da4712

Browse files
committed
fix DateField
1 parent 558c222 commit 9da4712

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/bento-design-system/src/DateField/DateField.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ function RangeDateField(props: RangeDateFieldProps) {
119119
export type DateFieldProps = SingleDateFieldProps | RangeDateFieldProps;
120120

121121
export function DateField(props: DateFieldProps) {
122+
if (props.type == null) {
123+
return <SingleDateField {...props} />;
124+
}
122125
return match(props)
123126
.with({ type: "single" }, (props) => <SingleDateField {...props} />)
124-
.with({ type: undefined }, (props) => <SingleDateField {...props} />)
125127
.with({ type: "range" }, (props) => <RangeDateField {...props} />)
126128
.exhaustive();
127129
}

0 commit comments

Comments
 (0)