Skip to content

Commit fc46981

Browse files
committed
fix(DateField): can not switch segment when entering "00"
1 parent 91418e5 commit fc46981

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/DateField/hooks/useBaseDateFieldState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ export function useBaseDateFieldState<T = DateTime>(
384384
this.focusNextSection();
385385
}
386386
} else {
387-
enteredKeys.current = newValue === '0' ? '' : newValue;
387+
enteredKeys.current = newValue === '0' && !allowsZero ? '' : newValue;
388388
}
389389
};
390390

0 commit comments

Comments
 (0)