|
328 | 328 | },
|
329 | 329 | setConfigs() {
|
330 | 330 | let vm = this;
|
| 331 | + let globalOptions; |
331 | 332 | if (typeof vm.$getOptions !== "undefined") {
|
332 | 333 | // Global Options
|
333 |
| - let globalOptions = vm.$getOptions(); |
| 334 | + globalOptions = vm.$getOptions(); |
334 | 335 | Object.keys(globalOptions).map(function (objectKey) {
|
335 | 336 | if (typeof (vm.fConfigs[objectKey]) !== "undefined") {
|
336 | 337 | vm.$set(vm.fConfigs, objectKey, globalOptions[objectKey]);
|
|
339 | 340 | }
|
340 | 341 |
|
341 | 342 |
|
342 |
| - if (typeof (this.configs) !== "undefined") { |
343 |
| - Object.keys(this.fConfigs).map(function (objectKey) { |
| 343 | + if (typeof (vm.configs) !== "undefined") { |
| 344 | + Object.keys(vm.fConfigs).map(function (objectKey) { |
344 | 345 | if (typeof (vm.configs[objectKey]) !== "undefined") {
|
345 | 346 | // Get From Configs
|
346 | 347 | vm.$set(vm.fConfigs, objectKey, vm.configs[objectKey]);
|
347 |
| - } else { |
348 |
| - // Get From Props |
349 |
| - if (typeof (globalOptions[objectKey]) === "undefined") { |
350 |
| - vm.$set(vm.fConfigs, objectKey, vm.$props[objectKey]); |
351 |
| - } |
352 | 348 | }
|
353 | 349 | });
|
354 | 350 | } else {
|
355 |
| - Object.keys(this.$props).map(function (objectKey) { |
| 351 | + Object.keys(vm.$props).map(function (objectKey) { |
356 | 352 | if (typeof (vm.fConfigs[objectKey]) !== "undefined" && typeof (vm.$props[objectKey]) !== "undefined") {
|
357 | 353 | vm.$set(vm.fConfigs, objectKey, vm.$props[objectKey]);
|
358 | 354 | }
|
359 | 355 | });
|
360 | 356 | }
|
361 | 357 |
|
362 | 358 | // Is Modal
|
363 |
| - if (this.fConfigs.isModal) this.showCalendar = false; |
| 359 | + if (vm.fConfigs.isModal) vm.showCalendar = false; |
364 | 360 |
|
365 | 361 | // Placeholder
|
366 |
| - if (!this.fConfigs.placeholder) this.fConfigs.placeholder = this.fConfigs.dateFormat; |
| 362 | + if (!vm.fConfigs.placeholder) vm.fConfigs.placeholder = vm.fConfigs.dateFormat; |
367 | 363 |
|
368 |
| - if (typeof this.newCurrentDate !== "undefined") { |
369 |
| - this.calendar.currentDate = this.newCurrentDate; |
| 364 | + if (typeof vm.newCurrentDate !== "undefined") { |
| 365 | + vm.calendar.currentDate = vm.newCurrentDate; |
370 | 366 | }
|
371 | 367 |
|
372 | 368 | // Sunday Start
|
373 |
| - if (this.fConfigs.sundayStart) { |
374 |
| - let dayNames = this.fConfigs.dayNames; |
| 369 | + if (vm.fConfigs.sundayStart) { |
| 370 | + let dayNames = vm.fConfigs.dayNames; |
375 | 371 | let sundayName = dayNames[dayNames.length - 1];
|
376 | 372 | dayNames.splice(dayNames.length - 1, 1);
|
377 | 373 | dayNames.unshift(sundayName);
|
|
0 commit comments