From 015845f76ba771132b635da2fda7df18707ce92f Mon Sep 17 00:00:00 2001
From: Burak Civan <burakcivan22@gmail.com>
Date: Wed, 2 Jun 2021 15:25:50 +0300
Subject: [PATCH] Bugfix solved

---
 resources/assets/js/views/wizard/Company.vue | 23 +++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/resources/assets/js/views/wizard/Company.vue b/resources/assets/js/views/wizard/Company.vue
index 09c15b25d..e6ff7db02 100644
--- a/resources/assets/js/views/wizard/Company.vue
+++ b/resources/assets/js/views/wizard/Company.vue
@@ -64,8 +64,7 @@
                                   dateFormat: 'd-m',
                                   allowInput: false,
                                   altInput: true,
-                                  altFormat: 'j F',
-                                  locale:require(`flatpickr/dist/l10n/${lang_data}.js`).default[lang_data]
+                                  altFormat: 'j F'
                                 }"
                                 v-model="real_date"
                             ></akaunting-date>
@@ -154,8 +153,17 @@ export default {
 
         locale: {
             type: String,
-            default: 'en',
-        }
+        },
+
+        dateConfig: {
+            type: Object,
+            default: function () {
+                return {
+                   
+                };
+            },
+            description: "FlatPckr date configuration"
+        },
     },
 
     data() {
@@ -170,7 +178,12 @@ export default {
     created() {
         if(document.documentElement.lang) {
             let lang_split = document.documentElement.lang.split("-");
-            this.lang_data = lang_split[0];
+
+            if (lang_split[0] !== 'en') {
+                
+            const lang = require(`flatpickr/dist/l10n/${lang_split[0]}.js`).default[lang_split[0]];
+            this.dateConfig.locale = lang;
+            }
         }
     },