Commit 92513e8b5f3aa09ff69fdc1317e69dc0f119c63e
Committed by
GitHub
Merge pull request #3316 from SergioCrisostomo/fix-3277
compute calendar so we react on showWeekNumbers changes
Showing
1 changed file
with
4 additions
and
2 deletions
Show diff stats
src/components/date-picker/base/date-table.vue
| ... | ... | @@ -36,10 +36,8 @@ |
| 36 | 36 | }, |
| 37 | 37 | }, |
| 38 | 38 | data () { |
| 39 | - const weekStartDay = Number(this.t('i.datepicker.weekStartDay')); | |
| 40 | 39 | return { |
| 41 | 40 | prefixCls: prefixCls, |
| 42 | - calendar: new jsCalendar.Generator({onlyDays: !this.showWeekNumbers, weekStart: weekStartDay}) | |
| 43 | 41 | }; |
| 44 | 42 | }, |
| 45 | 43 | computed: { |
| ... | ... | @@ -51,6 +49,10 @@ |
| 51 | 49 | } |
| 52 | 50 | ]; |
| 53 | 51 | }, |
| 52 | + calendar(){ | |
| 53 | + const weekStartDay = Number(this.t('i.datepicker.weekStartDay')); | |
| 54 | + return new jsCalendar.Generator({onlyDays: !this.showWeekNumbers, weekStart: weekStartDay}); | |
| 55 | + }, | |
| 54 | 56 | headerDays () { |
| 55 | 57 | const weekStartDay = Number(this.t('i.datepicker.weekStartDay')); |
| 56 | 58 | const translatedDays = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'].map(item => { | ... | ... |