Calendar: fix year month display bug (#15394)

pull/15178/head
QingDeng 2019-05-07 11:22:28 +08:00 committed by iamkun
parent e0f42be5b0
commit e5c73e8e1b
1 changed files with 2 additions and 2 deletions

View File

@ -146,8 +146,8 @@ export default {
}, },
i18nDate() { i18nDate() {
const year = this.formatedDate.slice(0, 4); const year = this.date.getFullYear();
const month = this.formatedDate.slice(5, 7).replace('0', ''); const month = this.date.getMonth() + 1;
return `${year} ${this.t('el.datepicker.year')} ${this.t('el.datepicker.month' + month)}`; return `${year} ${this.t('el.datepicker.year')} ${this.t('el.datepicker.month' + month)}`;
}, },