mirror of https://github.com/ElemeFE/element
Fix year label space in year picker
parent
d9d673bcc3
commit
cbce532ab4
|
@ -436,7 +436,10 @@
|
||||||
const yearTranslation = this.t('el.datepicker.year');
|
const yearTranslation = this.t('el.datepicker.year');
|
||||||
if (this.currentView === 'year') {
|
if (this.currentView === 'year') {
|
||||||
const startYear = Math.floor(year / 10) * 10;
|
const startYear = Math.floor(year / 10) * 10;
|
||||||
return startYear + ' ' + yearTranslation + '-' + (startYear + 9) + ' ' + yearTranslation;
|
if (yearTranslation) {
|
||||||
|
return startYear + ' ' + yearTranslation + ' - ' + (startYear + 9) + ' ' + yearTranslation;
|
||||||
|
}
|
||||||
|
return startYear + ' - ' + (startYear + 9);
|
||||||
}
|
}
|
||||||
return this.year + ' ' + yearTranslation;
|
return this.year + ' ' + yearTranslation;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue