We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 558c222 commit 9da4712Copy full SHA for 9da4712
packages/bento-design-system/src/DateField/DateField.tsx
@@ -119,9 +119,11 @@ function RangeDateField(props: RangeDateFieldProps) {
119
export type DateFieldProps = SingleDateFieldProps | RangeDateFieldProps;
120
121
export function DateField(props: DateFieldProps) {
122
+ if (props.type == null) {
123
+ return <SingleDateField {...props} />;
124
+ }
125
return match(props)
126
.with({ type: "single" }, (props) => <SingleDateField {...props} />)
- .with({ type: undefined }, (props) => <SingleDateField {...props} />)
127
.with({ type: "range" }, (props) => <RangeDateField {...props} />)
128
.exhaustive();
129
}
0 commit comments