Commit 0916642089f3a9c3e45ac3914d945bd0b5ae70d5

Authored by Sergio Crisostomo
1 parent 89303674

add weekStartDay logic to date-table

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
src/components/date-picker/base/date-table.vue
... ... @@ -89,8 +89,8 @@
89 89 },
90 90 cells () {
91 91 const date = new Date(this.year, this.month, 1);
92   - let day = getFirstDayOfMonth(date); // day of first day
93   - day = (day === 0 ? 7 : day);
  92 + const weekStartDay = Number(this.t('i.datepicker.weekStartDay'));
  93 + const day = (getFirstDayOfMonth(date) || 7) - weekStartDay; // day of first day
94 94 const today = clearHours(new Date()); // timestamp of today
95 95 const selectDay = clearHours(new Date(this.value)); // timestamp of selected day
96 96 const minDay = clearHours(new Date(this.minDate));
... ...