Skip to content

Commit d4025bd

Browse files
committed
fix: Empty value is undefined not null.
1 parent 85e2362 commit d4025bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Date/inputUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function useDateInput({
2323
const [error, setError] = React.useState<null | string>(null)
2424
const formatter = useInputFormatter({ locale })
2525
const inputFormat = useInputFormat({ formatter, locale })
26-
const formattedValue = value !== null ? formatter.format(value) : ''
26+
const formattedValue = value ? formatter.format(value) : ''
2727
const onChangeText = (date: string) => {
2828
const dayIndex = inputFormat.indexOf('DD')
2929
const monthIndex = inputFormat.indexOf('MM')

0 commit comments

Comments
 (0)