Commit 0b524682 authored by baiyaaaaa's avatar baiyaaaaa Committed by GitHub

Merge pull request #2237 from fntneves/fn-fix-datepicker-translation

DatePicker: Fix year label space in year picker
parents 7539325e cbce532a
...@@ -436,7 +436,10 @@ ...@@ -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;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment