Skip to content

Commit

Permalink
fix 月份国际化判断问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xilanhuaweidapao committed Dec 7, 2023
1 parent 2fb5b43 commit 84d1878
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/common/_lang/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ export function initi18n(Vue, config) {
}
}

export function setDatePickerMonthLocale(locale) {
export function setDatePickerMonthLocale(i18n) {
if (!i18n || !i18n.locale) {
return;
}
let datePickerConfig = {};
let language = locale.locale;
let targetMessage = locale.getLocaleMessage(language);
let language = i18n.locale;
let targetMessage = i18n.getLocaleMessage(language);
if (targetMessage) {
EXTRA_LOCALE_FIELDS.forEach((fieldName) => {
if (targetMessage && targetMessage.DatePicker && targetMessage.DatePicker.lang[fieldName]) {
Expand Down

0 comments on commit 84d1878

Please sign in to comment.