Skip to content

Commit 0233c4b

Browse files
authored
fix(DateField): use current language for initial state (#234)
1 parent 281e02f commit 0233c4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/DateField/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ export function isAllSegmentsValid(
687687
export function useFormatSections(format: string) {
688688
const {t} = i18n.useTranslation();
689689
const {lang} = useLang();
690-
const [sections, setSections] = React.useState(() => splitFormatIntoSections(format, t));
690+
const [sections, setSections] = React.useState(() => splitFormatIntoSections(format, t, lang));
691691

692692
const [previous, setFormat] = React.useState({format, lang});
693693
if (format !== previous.format || lang !== previous.lang) {

0 commit comments

Comments
 (0)