From 5ca5a6eb98c406374a154f7192e9b87d64bfb144 Mon Sep 17 00:00:00 2001 From: Sergio Crisostomo Date: Fri, 6 Apr 2018 08:27:31 +0200 Subject: [PATCH] compute calendar so we react on showWeekNumbers changes --- src/components/date-picker/base/date-table.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/date-picker/base/date-table.vue b/src/components/date-picker/base/date-table.vue index b1dcd3b..09970b4 100644 --- a/src/components/date-picker/base/date-table.vue +++ b/src/components/date-picker/base/date-table.vue @@ -36,10 +36,8 @@ }, }, data () { - const weekStartDay = Number(this.t('i.datepicker.weekStartDay')); return { prefixCls: prefixCls, - calendar: new jsCalendar.Generator({onlyDays: !this.showWeekNumbers, weekStart: weekStartDay}) }; }, computed: { @@ -51,6 +49,10 @@ } ]; }, + calendar(){ + const weekStartDay = Number(this.t('i.datepicker.weekStartDay')); + return new jsCalendar.Generator({onlyDays: !this.showWeekNumbers, weekStart: weekStartDay}); + }, headerDays () { const weekStartDay = Number(this.t('i.datepicker.weekStartDay')); const translatedDays = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'].map(item => { -- libgit2 0.21.4