From f0f55a392c055ed1440b770515c20ded987b2363 Mon Sep 17 00:00:00 2001 From: Manuk Minasyan Date: Tue, 6 Nov 2018 00:17:04 +0400 Subject: [PATCH] Configs Function Override --- package.json | 2 +- src/Demo.vue | 8 ++++---- src/componentns/FunctionalCalendar.vue | 7 ++++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index af38223..1929958 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ }, "name": "vue-functional-calendar", "description": "A style-uninstallable datepicker component for Vue.js", - "version": "1.2.9", + "version": "1.3.0", "license": "ISC", "repository": { "type": "git", diff --git a/src/Demo.vue b/src/Demo.vue index 7a848b7..5aa3210 100644 --- a/src/Demo.vue +++ b/src/Demo.vue @@ -64,15 +64,15 @@ configs: { sundayStart: true, - isDatePicker: false, - isDateRange: true, + isDatePicker: true, + isDateRange: false, - isMultiple: true, + isMultiple: false, calendarsCount: 3, isModal: false, - changeMonthFunction: true, + changeMonthFunction: false, changeYearFunction: true, applyStylesheet: true, diff --git a/src/componentns/FunctionalCalendar.vue b/src/componentns/FunctionalCalendar.vue index af7f2a0..cb7463e 100644 --- a/src/componentns/FunctionalCalendar.vue +++ b/src/componentns/FunctionalCalendar.vue @@ -566,7 +566,12 @@ }, setConfigs() { if (typeof (this.configs) !== "undefined") { - this.fConfigs = this.configs; + let vm = this; + Object.keys(this.configs).map(function (objectKey) { + if (typeof (vm.fConfigs[objectKey]) !== "undefined") { + vm.$set(vm.fConfigs, objectKey, vm.configs[objectKey]); + } + }); } else { this.fConfigs.sundayStart = this.sundayStart;