Skip to content

Commit 1b13699

Browse files
fix: replace momentJS with dayJS in autocomplete comp.
1 parent 1b530b2 commit 1b13699

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteComp.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import {
4444
booleanExposingStateControl,
4545
} from "comps/controls/codeStateControl";
4646

47-
import { getMomentLocale } from "i18n/momentLocale";
47+
import { getDayJSLocale } from "i18n/dayjsLocale";
4848
import {
4949
autoCompleteDate,
5050
itemsDataTooltip,
@@ -151,7 +151,7 @@ let AutoCompleteCompBase = (function () {
151151
const [validateState, setvalidateState] = useState({});
152152

153153
// 是否中文环境
154-
const [chineseEnv, setChineseEnv] = useState(getMomentLocale() === "zh-cn");
154+
const [chineseEnv, setChineseEnv] = useState(getDayJSLocale() === "zh-cn");
155155

156156
useEffect(() => {
157157
setsearchtext(props.value.value);
@@ -346,11 +346,11 @@ let AutoCompleteCompBase = (function () {
346346
tooltip: itemsDataTooltip,
347347
placeholder: "[]",
348348
})}
349-
{getMomentLocale() === "zh-cn" &&
349+
{getDayJSLocale() === "zh-cn" &&
350350
children.searchFirstPY.propertyView({
351351
label: trans("autoComplete.searchFirstPY"),
352352
})}
353-
{getMomentLocale() === "zh-cn" &&
353+
{getDayJSLocale() === "zh-cn" &&
354354
children.searchCompletePY.propertyView({
355355
label: trans("autoComplete.searchCompletePY"),
356356
})}

0 commit comments

Comments
 (0)