Skip to content

Commit

Permalink
Configs Function Override
Browse files Browse the repository at this point in the history
  • Loading branch information
ManukMinasyan committed Nov 5, 2018
1 parent 471cac0 commit f0f55a3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions src/Demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 6 additions & 1 deletion src/componentns/FunctionalCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f0f55a3

Please sign in to comment.