diff --git a/src/components/date-picker/base/date-table.vue b/src/components/date-picker/base/date-table.vue index a8a64c5..aa66e28 100644 --- a/src/components/date-picker/base/date-table.vue +++ b/src/components/date-picker/base/date-table.vue @@ -3,7 +3,9 @@ :class="classes" @mousemove="handleMouseMove">
- {{ t('i.datepicker.weeks.sun') }}{{ t('i.datepicker.weeks.mon') }}{{ t('i.datepicker.weeks.tue') }}{{ t('i.datepicker.weeks.wed') }}{{ t('i.datepicker.weeks.thu') }}{{ t('i.datepicker.weeks.fri') }}{{ t('i.datepicker.weeks.sat') }} + + {{day}} +
{{ cell.text }} @@ -87,6 +89,14 @@ `${prefixCls}` ]; }, + headerDays () { + const weekStartDay = Number(this.t('i.datepicker.weekStartDay')); + const translatedDays = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'].map(item => { + return this.t('i.datepicker.weeks.' + item); + }) + const weekDays = translatedDays.splice(weekStartDay, 7 - weekStartDay).concat(translatedDays.splice(0, weekStartDay)); + return weekDays; + }, cells () { const date = new Date(this.year, this.month, 1); const weekStartDay = Number(this.t('i.datepicker.weekStartDay')); diff --git a/yarn.lock b/yarn.lock old mode 100644 new mode 100755 index 3707aab..3707aab --- a/yarn.lock +++ b/yarn.lock -- libgit2 0.21.4