Fix year label space in year picker

pull/2237/head
Francisco Neves 2017-01-05 16:14:31 +00:00
parent d9d673bcc3
commit cbce532ab4
1 changed files with 4 additions and 1 deletions

View File

@ -436,7 +436,10 @@
const yearTranslation = this.t('el.datepicker.year');
if (this.currentView === 'year') {
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;
}