Commit 402dbd315f7e8105fd2243dd8c9bf682019fcf0f

Authored by Aresn
Committed by GitHub
2 parents 19b61e0a 3ecbf203

Merge pull request #1997 from SergioCrisostomo/add-week-start-locale

Add week start (locale setting)
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));
... ...
src/locale/lang/de-DE.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: 'November',
34 34 month12: 'Dezember',
35 35 year: '',
  36 + weekStartDay: '1',
36 37 weeks: {
37 38 sun: 'So',
38 39 mon: 'Mo',
... ... @@ -93,4 +94,4 @@ export default {
93 94 emptyText: 'Keine Daten'
94 95 }
95 96 }
96   -};
97 97 \ No newline at end of file
  98 +};
... ...
src/locale/lang/en-US.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: 'November',
34 34 month12: 'December',
35 35 year: '',
  36 + weekStartDay: '0',
36 37 weeks: {
37 38 sun: 'Sun',
38 39 mon: 'Mon',
... ... @@ -93,4 +94,4 @@ export default {
93 94 emptyText: 'No Data'
94 95 }
95 96 }
96   -};
97 97 \ No newline at end of file
  98 +};
... ...
src/locale/lang/es-ES.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: 'Noviembre',
34 34 month12: 'Deciembre',
35 35 year: 'Año',
  36 + weekStartDay: '1',
36 37 weeks: {
37 38 sun: 'Domingo',
38 39 mon: 'Lunes',
... ...
src/locale/lang/fr-FR.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: 'Novembre',
34 34 month12: 'Decembre',
35 35 year: '',
  36 + weekStartDay: '1',
36 37 weeks: {
37 38 sun: 'Dim',
38 39 mon: 'Lun',
... ...
src/locale/lang/id-ID.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: 'November',
34 34 month12: 'Desember',
35 35 year: '',
  36 + weekStartDay: '1',
36 37 weeks: {
37 38 sun: 'Min',
38 39 mon: 'Sen',
... ... @@ -93,4 +94,4 @@ export default {
93 94 emptyText: 'Tidak ada data'
94 95 }
95 96 }
96   -};
97 97 \ No newline at end of file
  98 +};
... ...
src/locale/lang/ja-JP.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: '11 月',
34 34 month12: '12 月',
35 35 year: '年',
  36 + weekStartDay: '0',
36 37 weeks: {
37 38 sun: '日',
38 39 mon: '月',
... ... @@ -93,4 +94,4 @@ export default {
93 94 emptyText: 'データなし'
94 95 }
95 96 }
96   -};
97 97 \ No newline at end of file
  98 +};
... ...
src/locale/lang/ko-KR.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: '11월',
34 34 month12: '12월',
35 35 year: '년',
  36 + weekStartDay: '0',
36 37 weeks: {
37 38 sun: '일',
38 39 mon: '월',
... ... @@ -93,4 +94,4 @@ export default {
93 94 emptyText: '데이터 없음'
94 95 }
95 96 }
96   -};
97 97 \ No newline at end of file
  98 +};
... ...
src/locale/lang/pt-BR.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: 'Novembro',
34 34 month12: 'Dezembro',
35 35 year: 'Ano',
  36 + weekStartDay: '0',
36 37 weeks: {
37 38 sun: 'Dom',
38 39 mon: 'Seg',
... ... @@ -93,4 +94,4 @@ export default {
93 94 emptyText: 'Sem dados'
94 95 }
95 96 }
96   -};
97 97 \ No newline at end of file
  98 +};
... ...
src/locale/lang/pt-PT.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: 'Novembro',
34 34 month12: 'Dezembro',
35 35 year: 'Ano',
  36 + weekStartDay: '1',
36 37 weeks: {
37 38 sun: 'Dom',
38 39 mon: 'Seg',
... ...
src/locale/lang/ru-RU.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: 'Ноябрь',
34 34 month12: 'Декабрь',
35 35 year: '',
  36 + weekStartDay: '1',
36 37 weeks: {
37 38 sun: 'Вс',
38 39 mon: 'Пн',
... ... @@ -93,4 +94,4 @@ export default {
93 94 emptyText: 'Нет данных'
94 95 }
95 96 }
96   -};
97 97 \ No newline at end of file
  98 +};
... ...
src/locale/lang/sv-SE.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: 'November',
34 34 month12: 'December',
35 35 year: 'År',
  36 + weekStartDay: '1',
36 37 weeks: {
37 38 sun: 'Sön',
38 39 mon: 'Mån',
... ...
src/locale/lang/tr-TR.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: 'Kasım',
34 34 month12: 'Aralık',
35 35 year: '',
  36 + weekStartDay: '0',
36 37 weeks: {
37 38 sun: 'Paz',
38 39 mon: 'Pzt',
... ...
src/locale/lang/vi-VN.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: 'Tháng 11',
34 34 month12: 'Tháng 12',
35 35 year: '',
  36 + weekStartDay: '1',
36 37 weeks: {
37 38 sun: 'CN',
38 39 mon: 'T2',
... ...
src/locale/lang/zh-CN.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: '11 月',
34 34 month12: '12 月',
35 35 year: '年',
  36 + weekStartDay: '0',
36 37 weeks: {
37 38 sun: '日',
38 39 mon: '一',
... ... @@ -93,4 +94,4 @@ export default {
93 94 emptyText: '暂无数据'
94 95 }
95 96 }
96   -};
97 97 \ No newline at end of file
  98 +};
... ...
src/locale/lang/zh-TW.js
... ... @@ -33,6 +33,7 @@ export default {
33 33 month11: '11 月',
34 34 month12: '12 月',
35 35 year: '年',
  36 + weekStartDay: '0',
36 37 weeks: {
37 38 sun: '日',
38 39 mon: '一',
... ... @@ -93,4 +94,4 @@ export default {
93 94 emptyText: '暫無數據'
94 95 }
95 96 }
96   -};
97 97 \ No newline at end of file
  98 +};
... ...